Process and move around images, ready for posting to my blogs.
.gitignore | ||
LICENSE | ||
process.py | ||
README.md | ||
requirements.txt | ||
resizing-notes.md | ||
settings_template.py |
blog-image-processing
Process and move around images, ready for posting to my blogs.
This script assumes that you’re providing it with a single argument: the filename of an image that needs processing.
The image will be copied to the folder that’s found in the settings.py
file as image_destination
. The script will enforce a maximum image width of 2000 pixels. Additionally, if the image is wider than 500 pixels, a thumbnail will be created in the folder that’s found in the settings.py
file as thumbnail_destination
.
The script will output a JSON dictionary with information about the image’s URL, height, and width. The base URL is specified in settings.py
as image_urlbase
and thumbnail_urlbase
.