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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f576f2350205a0db76375ecf79d750739f4577e648191b259c145dec7cbed055 |
|
MD5 | 1061474ee8a796d087683938c5985b8c |
|
BLAKE2b-256 | 29aa436f51e87190d23b24f366157a667ac21e37eb1767ce627f23e030933109 |
Close
Hashes for make_responsive_images-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0ab8aa59316bfae61ac8e2834c451b6d03091f3fd18f3e57d8370a762980d14 |
|
MD5 | 80e2e4764fdd47921805a85a39a35e0a |
|
BLAKE2b-256 | 7873fdaea61d14c59c2acc4ae6593a43ef0ace66c46b5623b2b1e2136c664f2b |