Generate responsive images for your website, so you can use srcset in your <img> tags and serve an optimal image to each device that views your site.
Project description
make-responsive-images
Generate responsive images automatically, for websites to use srcset
and sizes
in the <img>
tags.
This way you serve an optimal image for each device viewport size.
Installation
pip install make-responsive-images
Usage
resize [OPTIONS] COMMAND [ARGS]...
Options
-v, --version
: Show the application's version and exit.--help
: Show this message and exit.
Commands
image
: Resize one image
Usage
resize image [OPTIONS] [IMAGE]
Arguments
[IMAGE]
: [default: /workspace/tests/fixtures/xfer-original.jpg]
Options
--widths TEXT
: [default: 600,1000,1400]--widths TEXT
: Widths of new images, in pixels [default: 600,1000,1400]--html / --no-html
: Generate HTML tag [default: True]--classes TEXT
: Classnames to add to the tag (e.g. class="img-fluid")--img-sizes TEXT
: Sizes for the tag (e.g. sizes="100vw") [default: 100vw]--lazy / --no-lazy
: Adds loading="lazy" to tag for SEO [default: True]--alt TEXT
: Adds alt="" to the tag (e.g. alt="Funny image") [default: ]--dir TEXT
: Images directory to prepend to the src (e.g.src="<dir>/<image>"
)--help
: Show this message and exit.
Author Info
Sean McCarthy is Chief Data Scientist at IJACK Technologies Inc, a leading manufacturer of fully-automated pumps to green the oil and gas industry.
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.
Source Distribution
Built Distribution
Close
Hashes for make-responsive-images-0.1.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64422f9bb47c45cc1f0a1971c094caefb2bf026d5a56c3ef478fe7fef98b0cc0 |
|
MD5 | 27ad9f9458ebd84a21c38eb6e85a0473 |
|
BLAKE2b-256 | 552f293d2306fce4e26a68150d15beb01f1ff6357f7a22812ce8192cbe7ae341 |
Close
Hashes for make_responsive_images-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39c39d46f47b3e823635dea101cddd05ba19ce15fa33b5349d32791ba73f54f4 |
|
MD5 | 1a9814add130459683336377a87edec4 |
|
BLAKE2b-256 | d8559ad338ee042817b66c3e04a81151fd53c83504b90d110b02833840e36f5c |