Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bassemhalim/shopify-bulk-image-resize
resize all shopify product images to be square 2048x2048 filling the background black
https://github.com/bassemhalim/shopify-bulk-image-resize
pillow python3 shopify shopify-api
Last synced: 18 days ago
JSON representation
resize all shopify product images to be square 2048x2048 filling the background black
- Host: GitHub
- URL: https://github.com/bassemhalim/shopify-bulk-image-resize
- Owner: BassemHalim
- Created: 2023-12-04T20:59:53.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-04T21:28:21.000Z (about 1 year ago)
- Last Synced: 2024-04-21T15:06:30.815Z (9 months ago)
- Topics: pillow, python3, shopify, shopify-api
- Language: Python
- Homepage:
- Size: 919 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
I had a lot of rectangular product images on shopify that where already uploaded and assigned to products that didn't look right on the website (were being cropped to be square) because the recommended product image size is 2048x2048.
There was no shopify feature to bulk resize images. In addition, the images had to be filled and croped because they were rectangular. Luckly the image background was pure black so it was easy to fill the missing part of the image black
This script checks every product image and if the image is rectangular or square but not 2048x2048 it will:
- download the image
- resize it to 2048x2048
- fill background black (0,0,0)
- update product imagefor the shopify api you only need the store url and the store access token with product read and write permissions
to get the token go to Apps and Sales channel > Develop Apps > create an AppBefore:\
5568 × 3712 \After:\
2048 x 2048\