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
: 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: False]--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="/")--fmt TEXT
: Image type to save as ("jpg" and "webp" supported) [default: webp]--qual INTEGER
: Compression to apply (i.e. 0=max, 100=min) [default: 100]--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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb25a60734c54a4dc709e9961346c419a85adae0b9b5db108101303184a38215 |
|
MD5 | 5bbcf12dc30806d2228b4931efe7ce9b |
|
BLAKE2b-256 | e842c92d4413ba2cae233eee8266911793ec3c65544f837e2cd11ed3360ddd06 |
Close
Hashes for make_responsive_images-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9a94b89c9d9cbd5a32ba2e025de7c2b44b9cd6b8c8cc9b5dd7bc622069f21f1 |
|
MD5 | c26dd3a916cb0d7d12a4a9d64e52f85c |
|
BLAKE2b-256 | 097a395e970dfa9263dc949bfef8f4c8ae53adf2277b725fe6d06e038b634744 |