Skip to main content

This package was made to help generate responsive images in bulk

Project description

Responsive generator

Responsive images generator is a command line python package that would convert all the images in your folder to responsive ones in their own designated folder. The main goal of this package is to help developers quickly generate responsive images in bulk.

Image Sizes that would be generated

The Image sizes that would be generated would be based on the recommendations of this article

  • 1920px (For FullHD Screens and up)
  • 1600px (For desktops anf tables in portrait mode
  • 1366px (Desktop)
  • 1024px (1024X768 screens)
  • 768px (Useful for 2x 375px mobile screens as well as any device)
  • 640px (for smartphones)

Installation and updating

Use the package manager pip to install Res like below. Rerun this command to check for and install updates .

pip install resgen

Usage

Make use you have python installed and Python script has been added to Windows Path, Mac's Path or Linux Path

You need to run the command in the folder where your image folder would be For example, in the tree below, if your image folder is images, you run the command in root

├── root
│   ├── images

While inside the folder, set the output folder and input folder

resgen  --input_folder  [input_folder] --output_folder [output_folder] 

or (if you havent added Python/Script to path)

python -m resgen  --input_folder  [input_folder] --output_folder [output_folder] 
  • input_folder: The name of the input folder where the images are. Don't use ./input_folder . Just the name only
  • output_folder: The name of the input folder where you want to save the files

For Windows: To use this command without adding Python -m as the beginning, Make sure Python Script is added to your PATH. Refer Here

The command would create folders in the output folder depending on the number of the images you have.

├── output_folder
│   ├── image_1
        ├── image_1_640_.jpeg
        ├── image_1_760_.jpeg

image_1_760_.jpeg represent the image with 760px for instance

Demo:

 resgen --input_folder input_folder --output_folder output_folder

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resgen-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

resgen-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file resgen-1.0.0.tar.gz.

File metadata

  • Download URL: resgen-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

File hashes

Hashes for resgen-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8e728d473bdc3574e0d59d3239b70f8c4262ad682d246aa90b0b2a3d82e9d14d
MD5 a0a14f337820fb3b6a6cd6ba766623d6
BLAKE2b-256 b96125aa72c1c726cebe55b265928c9a7baf983f1d6d184ac0964c856911dd87

See more details on using hashes here.

File details

Details for the file resgen-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: resgen-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

File hashes

Hashes for resgen-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8e329c7fb26bf3628339cbc0b69b72c6579c0ba57b45c57d384b2b49d6a5fc4
MD5 a73dc74ed5e274ad683cbc0508a2e94b
BLAKE2b-256 60052e0c7158342e1e7d9cd540efb02b8631ac60586c716d362a4b516323b6c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page