Skip to main content

Convert image URLs to Netlify LFS resize URLs.

Project description


PyPI - License security: bandit PyPI - Downloads

Please note!

Netlify Large Media has now been deprecated. This plugin will no longer be maintained. I would like to take this opportunity to thank everyone who's used it - I hope you've been happy with the service it has provided.


This plugin provides a filter that allows the user to generate Netlify Image Transformation resize URL parameters when working with Netlify Large Media.


You can install this plugin by running the following command in your project's directory:

lektor plugins add netlify-lfs-resize-url


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 correspond to Netlify transformation parameters.

Argument Accepts Default
nf_resize 'fit', 'smartcrop' 'fit'
h Positive integers null
w Positive integers null



All of the tests can be run by executing with the pipenv shell activated.

Static analysis and checking

mypy is used for static analysis, and flake8 is used for checking:

python -m mypy
python -m mypy
python -m flake8
python -m flake8

Unit testing

Python's built-in unittest framework is used for unit testing:

python -m unittest


bandit is used for security testing:

python -m bandit

Uploading the plugin to PyPI

python -m build
python -m twine upload dist/*

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

lektor_netlify_lfs_resize_url-1.0.3.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page