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: 500,1000,1500,2000,2500]--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="dir/images")--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]--lower / --no-lower
: Converts filename to lowercase [default: True]--dashes / --no-dashes
: Converts underscores to dashes for SEO [default: True]--flask / --no-flask
: Uses Python Flask's 'url_for('static', ...)' [default: False]--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
File details
Details for the file make_responsive_images-0.1.17.tar.gz
.
File metadata
- Download URL: make_responsive_images-0.1.17.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96eb7dfb20c36a2cd6a30674f8cba4943ea98271727af8e167472cb4f7a4dec0 |
|
MD5 | 382e69f61995dfa23548678e54b3d323 |
|
BLAKE2b-256 | 6c75ad7d07bd397cbd6a2137ca005e1478c24ac62b28e5125070998d8a011e4f |
File details
Details for the file make_responsive_images-0.1.17-py3-none-any.whl
.
File metadata
- Download URL: make_responsive_images-0.1.17-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f6f687976f5f3058dcff8ec0c66d59f3085578226b53c763a379ae951b3bee2 |
|
MD5 | dd655723818a031a4318809c7aa7123b |
|
BLAKE2b-256 | 8e2be463529f2ad35dd393b172b7d15074eef413b270d2b56c2f4c89fc1f3eec |