# `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.
<p align="center">
<a href="https://github.com/mccarthysean/make-responsive-images/actions?query=workflow%3ATest" target="_blank">
<img src="https://github.com/mccarthysean/make-responsive-images/workflows/Test/badge.svg" alt="Test">
</a>
<a href="https://codecov.io/gh/mccarthysean/make-responsive-images" target="_blank">
<img src="https://img.shields.io/codecov/c/github/mccarthysean/make-responsive-images?color=%2334D058" alt="Coverage">
</a>
<a href="https://github.com/mccarthysean/make-responsive-images/actions?query=workflow%3Apypi" target="_blank">
<img src="https://github.com/mccarthysean/make-responsive-images/workflows/Upload%20Package%20to%20PyPI/badge.svg" alt="Publish">
</a>
<a href="https://pypi.org/project/make-responsive-images" target="_blank">
<img src="https://img.shields.io/pypi/v/make-responsive-images?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/make-responsive-images/" target="_blank">
<img src="https://img.shields.io/pypi/pyversions/make-responsive-images.svg" alt="Python Versions">
</a>
</p>
## Installation
[Install from PyPI](https://pypi.org/project/make-responsive-images/)
```bash
pip install make-responsive-images
```
## Usage
```bash
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
```bash
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 <img> tag [default: True]
* `--classes TEXT`: Classnames to add to the <img> tag (e.g. class="img-fluid")
* `--img-sizes TEXT`: Sizes for the <img> tag (e.g. sizes="100vw") [default: 100vw]
* `--lazy / --no-lazy`: Adds loading="lazy" to <img> tag for SEO [default: False]
* `--alt TEXT`: Adds alt="" to the <img> 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](https://myijack.com), a leading manufacturer of fully-automated pumps to green the oil and gas industry.
<br>
<a href="https://mccarthysean.dev">
<img src="https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/mccarthysean.svg?sanitize=1" alt="Sean McCarthy's blog">
</a>
<a href="https://www.linkedin.com/in/seanmccarthy2/">
<img src="https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/linkedin.svg?sanitize=1" alt="LinkedIn">
</a>
<a href="https://github.com/mccarthysean">
<img src="https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/github.svg?sanitize=1" alt="GitHub">
</a>
<a href="https://twitter.com/mccarthysean">
<img src="https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/twitter.svg?sanitize=1" alt="Twitter">
</a>
<a href="https://www.facebook.com/sean.mccarth">
<img src="https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/facebook.svg?sanitize=1" alt="Facebook">
</a>
<a href="https://medium.com/@mccarthysean">
<img src="https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/medium.svg?sanitize=1" alt="Medium">
</a>
<a href="https://www.instagram.com/mccarthysean/">
<img src="https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/instagram.svg?sanitize=1" alt="Instagram">
</a>
Raw data
{
"_id": null,
"home_page": "https://mccarthysean.dev/make-responsive-images",
"name": "make-responsive-images",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "responsive, images, generator",
"author": "Sean McCarthy",
"author_email": "sean.mccarthy@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/6c/75/ad7d07bd397cbd6a2137ca005e1478c24ac62b28e5125070998d8a011e4f/make_responsive_images-0.1.17.tar.gz",
"platform": null,
"description": "# `make-responsive-images`\n\nGenerate responsive images automatically, for websites to use `srcset` and `sizes` in the `<img>` tags.\n\nThis way you serve an optimal image for each device viewport size.\n\n<p align=\"center\">\n<a href=\"https://github.com/mccarthysean/make-responsive-images/actions?query=workflow%3ATest\" target=\"_blank\">\n <img src=\"https://github.com/mccarthysean/make-responsive-images/workflows/Test/badge.svg\" alt=\"Test\">\n</a>\n<a href=\"https://codecov.io/gh/mccarthysean/make-responsive-images\" target=\"_blank\">\n <img src=\"https://img.shields.io/codecov/c/github/mccarthysean/make-responsive-images?color=%2334D058\" alt=\"Coverage\">\n</a>\n<a href=\"https://github.com/mccarthysean/make-responsive-images/actions?query=workflow%3Apypi\" target=\"_blank\">\n <img src=\"https://github.com/mccarthysean/make-responsive-images/workflows/Upload%20Package%20to%20PyPI/badge.svg\" alt=\"Publish\">\n</a>\n<a href=\"https://pypi.org/project/make-responsive-images\" target=\"_blank\">\n <img src=\"https://img.shields.io/pypi/v/make-responsive-images?color=%2334D058&label=pypi%20package\" alt=\"Package version\">\n</a>\n<a href=\"https://pypi.org/project/make-responsive-images/\" target=\"_blank\">\n <img src=\"https://img.shields.io/pypi/pyversions/make-responsive-images.svg\" alt=\"Python Versions\">\n</a>\n</p>\n\n## Installation\n\n[Install from PyPI](https://pypi.org/project/make-responsive-images/)\n\n```bash\npip install make-responsive-images\n```\n\n## Usage\n\n```bash\nresize [OPTIONS] COMMAND [ARGS]...\n```\n\n### Options\n\n* `-v, --version`: Show the application's version and exit.\n* `--help`: Show this message and exit.\n\n## Commands\n\n* `image`: Resize one image\n\n### Usage\n\n```bash\nresize image [OPTIONS] [IMAGE]\n```\n\n### Arguments\n\n* `[IMAGE]`: [default: /workspace/tests/fixtures/xfer-original.jpg]\n\n### Options\n\n* `--widths TEXT`: Widths of new images, in pixels [default: 500,1000,1500,2000,2500]\n* `--html / --no-html`: Generate HTML <img> tag [default: True]\n* `--classes TEXT`: Classnames to add to the <img> tag (e.g. class=\"img-fluid\")\n* `--img-sizes TEXT`: Sizes for the <img> tag (e.g. sizes=\"100vw\") [default: 100vw]\n* `--lazy / --no-lazy`: Adds loading=\"lazy\" to <img> tag for SEO [default: False]\n* `--alt TEXT`: Adds alt=\"\" to the <img> tag (e.g. alt=\"Funny image\") [default: ]\n* `--dir TEXT`: Images directory to prepend to the src (e.g. src=\"dir/images\")\n* `--fmt TEXT`: Image type to save as (\"jpg\" and \"webp\" supported) [default: webp]\n* `--qual INTEGER`: Compression to apply (i.e. 0=max, 100=min) [default: 100]\n* `--lower / --no-lower`: Converts filename to lowercase [default: True]\n* `--dashes / --no-dashes`: Converts underscores to dashes for SEO [default: True]\n* `--flask / --no-flask`: Uses Python Flask's 'url_for('static', ...)' [default: False]\n* `--help`: Show this message and exit.\n\n## Author Info\n\nSean McCarthy is Chief Data Scientist at [IJACK Technologies Inc](https://myijack.com), a leading manufacturer of fully-automated pumps to green the oil and gas industry.\n\n<br>\n<a href=\"https://mccarthysean.dev\">\n <img src=\"https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/mccarthysean.svg?sanitize=1\" alt=\"Sean McCarthy's blog\">\n</a>\n<a href=\"https://www.linkedin.com/in/seanmccarthy2/\">\n <img src=\"https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/linkedin.svg?sanitize=1\" alt=\"LinkedIn\">\n</a>\n<a href=\"https://github.com/mccarthysean\">\n <img src=\"https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/github.svg?sanitize=1\" alt=\"GitHub\">\n</a>\n<a href=\"https://twitter.com/mccarthysean\">\n <img src=\"https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/twitter.svg?sanitize=1\" alt=\"Twitter\">\n</a>\n<a href=\"https://www.facebook.com/sean.mccarth\">\n <img src=\"https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/facebook.svg?sanitize=1\" alt=\"Facebook\">\n</a>\n<a href=\"https://medium.com/@mccarthysean\">\n <img src=\"https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/medium.svg?sanitize=1\" alt=\"Medium\">\n</a>\n<a href=\"https://www.instagram.com/mccarthysean/\">\n <img src=\"https://raw.githubusercontent.com/mccarthysean/make-responsive-images/main/docs/assets/instagram.svg?sanitize=1\" alt=\"Instagram\">\n</a>\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "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.",
"version": "0.1.17",
"project_urls": {
"Documentation": "https://mccarthysean.dev/make-responsive-images",
"Homepage": "https://mccarthysean.dev/make-responsive-images",
"Repository": "https://github.com/mccarthysean/make-responsive-images",
"Sean's Blog": "https://mccarthysean.dev",
"Sean's Company": "https://myijack.com"
},
"split_keywords": [
"responsive",
" images",
" generator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8e2be463529f2ad35dd393b172b7d15074eef413b270d2b56c2f4c89fc1f3eec",
"md5": "dd655723818a031a4318809c7aa7123b",
"sha256": "4f6f687976f5f3058dcff8ec0c66d59f3085578226b53c763a379ae951b3bee2"
},
"downloads": -1,
"filename": "make_responsive_images-0.1.17-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dd655723818a031a4318809c7aa7123b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 8629,
"upload_time": "2024-10-03T18:06:38",
"upload_time_iso_8601": "2024-10-03T18:06:38.753818Z",
"url": "https://files.pythonhosted.org/packages/8e/2b/e463529f2ad35dd393b172b7d15074eef413b270d2b56c2f4c89fc1f3eec/make_responsive_images-0.1.17-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6c75ad7d07bd397cbd6a2137ca005e1478c24ac62b28e5125070998d8a011e4f",
"md5": "382e69f61995dfa23548678e54b3d323",
"sha256": "96eb7dfb20c36a2cd6a30674f8cba4943ea98271727af8e167472cb4f7a4dec0"
},
"downloads": -1,
"filename": "make_responsive_images-0.1.17.tar.gz",
"has_sig": false,
"md5_digest": "382e69f61995dfa23548678e54b3d323",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 7976,
"upload_time": "2024-10-03T18:06:40",
"upload_time_iso_8601": "2024-10-03T18:06:40.235566Z",
"url": "https://files.pythonhosted.org/packages/6c/75/ad7d07bd397cbd6a2137ca005e1478c24ac62b28e5125070998d8a011e4f/make_responsive_images-0.1.17.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 18:06:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mccarthysean",
"github_project": "make-responsive-images",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "atomicwrites",
"specs": [
[
"==",
"1.4.1"
]
]
},
{
"name": "attrs",
"specs": [
[
"==",
"24.2.0"
]
]
},
{
"name": "cfgv",
"specs": [
[
"==",
"3.4.0"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.7"
]
]
},
{
"name": "colorama",
"specs": [
[
"==",
"0.4.6"
]
]
},
{
"name": "distlib",
"specs": [
[
"==",
"0.3.8"
]
]
},
{
"name": "filelock",
"specs": [
[
"==",
"3.16.1"
]
]
},
{
"name": "identify",
"specs": [
[
"==",
"2.6.1"
]
]
},
{
"name": "iniconfig",
"specs": [
[
"==",
"2.0.0"
]
]
},
{
"name": "markdown-it-py",
"specs": [
[
"==",
"3.0.0"
]
]
},
{
"name": "mdurl",
"specs": [
[
"==",
"0.1.2"
]
]
},
{
"name": "nodeenv",
"specs": [
[
"==",
"1.9.1"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"24.1"
]
]
},
{
"name": "pillow",
"specs": [
[
"==",
"10.4.0"
]
]
},
{
"name": "platformdirs",
"specs": [
[
"==",
"4.3.6"
]
]
},
{
"name": "pluggy",
"specs": [
[
"==",
"1.5.0"
]
]
},
{
"name": "pre-commit",
"specs": [
[
"==",
"2.21.0"
]
]
},
{
"name": "py",
"specs": [
[
"==",
"1.11.0"
]
]
},
{
"name": "pygments",
"specs": [
[
"==",
"2.18.0"
]
]
},
{
"name": "pyright",
"specs": [
[
"==",
"1.1.383"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"6.2.5"
]
]
},
{
"name": "pyyaml",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "rich",
"specs": [
[
"==",
"13.9.1"
]
]
},
{
"name": "ruff",
"specs": [
[
"==",
"0.6.8"
]
]
},
{
"name": "shellingham",
"specs": [
[
"==",
"1.5.4"
]
]
},
{
"name": "toml",
"specs": [
[
"==",
"0.10.2"
]
]
},
{
"name": "typer",
"specs": [
[
"==",
"0.12.5"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.12.2"
]
]
},
{
"name": "virtualenv",
"specs": [
[
"==",
"20.26.6"
]
]
}
],
"lcname": "make-responsive-images"
}