MkDocs Resize Images Plugin
This MkDocs plugin finds all folders with a certain name, by default assets-large, resizes all images in those folders according to the plugin configuration.
Then saves the resized images in a different folder, by default assets.
The plugin also supports caching: if a file has not changed since the last time the plugin ran, it won't be processed again.
Installation
Install the plugin using pip from PyPI:
pip install mkdocs-resize-images
Activate the plugin in mkdocs.yml:
plugins:
- search
- resize-images
Create .gitignore file in your project root directory and add the following line to it:
assets-large # or whatever you have set as source-dir
.resize-hash # if you have enabled caching
Usage
By default, the plugin will look for images in all directories named assets-large, resize them to 800x600 pixels, and then save the resized images in assets directories in the same parent directories as the assets-large directories.
You can configure the plugin in your mkdocs.yml:
plugins:
- search
- resize-images:
source-dir: assets-large
target-dir: assets
enable_cache: True
size: [800, 600]
extensions: ['.jpg', '.jpeg', '.png', '.gif', '.svg']
source-dir: The name of the directories to search for images to resize. Default is assets-large.
target-dir: The name of the directories to save the resized images in. Default is assets.
size: The size to resize the images to, specified as [width, height]. Default is [800, 600].
extensions: List of image file extensions to consider for resizing. The plugin will look for images with these extensions in both lower and upper case. Default is ['.jpg', '.jpeg', '.png', '.gif', '.svg'].
enable_cache: Whether to enable caching. If enabled, the plugin will check if a file has changed since the last time the plugin ran, and if not, it won't process the file again. Default is True.
Metadata
Release files for mkdocs-resize-images 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkdocs-resize-images-1.0.1.tar.gz | 4.6 kB | Without provenance | Details for mkdocs-resize-images-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocs_resize_images-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for mkdocs_resize_images-1.0.1-py3-none-any.whl |
Total release size: 9.7 kB
Release files / mkdocs-resize-images-1.0.1.tar.gz
| Download URL | mkdocs-resize-images-1.0.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2717d86dee4350fe65848ecc813e2767b2899e12e0442053ad53f6f5aa7d6925
|
|
BLAKE2b-256 checksum How to use checksums |
3900722ee67b10dbe27ddb0ace2fed4090e74f1a598f5322b3048f7d8f2f2df3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.17
|
Release files / mkdocs_resize_images-1.0.1-py3-none-any.whl
| Download URL | mkdocs_resize_images-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
caa55c9e82ec471b2490d9b7da7e5b8ac72ee08f8c1053f4ca7ba90052117dd5
|
|
BLAKE2b-256 checksum How to use checksums |
7fd905d70cfe7a5aad92832c53d46686b625c4472a2993d83e15bc1f902981f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.17
|
Security for mkdocs-resize-images 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.