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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size lektor_netlify_lfs_resize_url-0.1.2-py3-none-any.whl (2.8 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size lektor-netlify-lfs-resize-url-0.1.2.tar.gz (2.1 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for lektor_netlify_lfs_resize_url-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ed32748a0392d6e651e8c68dcd035d0bbc08395fff2dac812ce8163b545b2c0 |
|
MD5 | 8aea62c15806bb91d9d135df7f43b6fd |
|
BLAKE2-256 | 27ee947235122e519dc12a75bf43257de307c7f5ffdf9d31b021cc33fecbf643 |
Close
Hashes for lektor-netlify-lfs-resize-url-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba7d541d133b34e6e445cd48b97aa613ba6a5eb1b46218cb2c2518378c598902 |
|
MD5 | 311165e8b2660d9f1b4f5d375e7c4e70 |
|
BLAKE2-256 | 3a9c4c373a044a9294a3e4754f658a084d1862e2950747697a183d8525fd8573 |