Skip to main content

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.

Test Coverage Publish Package version Python Versions

Installation

Install from PyPI

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.


Sean McCarthy's blog LinkedIn GitHub Twitter Facebook Medium Instagram

Metadata

Release files for make-responsive-images 0.1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for make-responsive-images 0.1.17
File Size Uploaded Provenance Actions
make_responsive_images-0.1.17.tar.gz 8.0 kB Without provenance Details for make_responsive_images-0.1.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for make-responsive-images 0.1.17
File Interpreter ABI Platform Actions
make_responsive_images-0.1.17-py3-none-any.whl Python 3 none any Details for make_responsive_images-0.1.17-py3-none-any.whl

Total release size: 16.6 kB

Release files / make_responsive_images-0.1.17.tar.gz

Download URL make_responsive_images-0.1.17.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
96eb7dfb20c36a2cd6a30674f8cba4943ea98271727af8e167472cb4f7a4dec0
BLAKE2b-256 checksum
How to use checksums
6c75ad7d07bd397cbd6a2137ca005e1478c24ac62b28e5125070998d8a011e4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2

Release files / make_responsive_images-0.1.17-py3-none-any.whl

Download URL make_responsive_images-0.1.17-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f6f687976f5f3058dcff8ec0c66d59f3085578226b53c763a379ae951b3bee2
BLAKE2b-256 checksum
How to use checksums
8e2be463529f2ad35dd393b172b7d15074eef413b270d2b56c2f4c89fc1f3eec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2

Security for make-responsive-images 0.1.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page