Convert image URLs to Netlify LFS resize URLs.
Project description
netlify-lfs-resize-url
This plugin provides a filter that allows the user to generate Netlify Image Transformation resize URL parameters when working with Netlify Large Media.
Installation
You can install this plugin by running the following command in your project's directory:
lektor plugins add netlify-lfs-resize-url
Usage
The nf_resize
filter works in conjunction with the url
filter as follows:
{% for image in this.attachments.images %}
<img src="{{ image|url|nf_resize(w=720) }}">
{% endfor %}
The above will return the following:
<img src="/images/example.png?nf_resize=fit&w=720">
Arguments
Arguments correspond to Netlify transformation parameters.
Argument | Accepts | Default |
---|---|---|
nf_resize |
'fit', 'smartcrop' | 'fit' |
h |
Positive integers | null |
w |
Positive integers | null |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for lektor-netlify-lfs-resize-url-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c87b2bea56a50ecc1bd1e508bce59ccab01a31d4d17a959d3dc3d729eeb4a55a |
|
MD5 | f7620550ecc43178fe4da524e709c614 |
|
BLAKE2b-256 | 6485deb1be5962c03e20883de55b2112297c48ed532599a44d5b75504f09d4b8 |
Close
Hashes for lektor_netlify_lfs_resize_url-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35644f56c622b64af1faf8fc655618674fc96b2b721fb44e26b1b2a7be76c329 |
|
MD5 | 368cbc7de547d1d27f9490ff9c74cbf5 |
|
BLAKE2b-256 | a5d6664d574dd3bac9fe03e0c010b1ff174f876632e63bfcc0b230867f72f7a3 |