flask-images | flask application designed to respond to SQS messages
kandi X-RAY | flask-images Summary
kandi X-RAY | flask-images Summary
A flask application designed to respond to SQS messages and resize images
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Resizes the image at the specified URL
- Resize an image
- Resizes an image
- Calculates the best image crop based on input and crop
- Calculates the best image size
- Generate a key name for the given size
- Process a POST request
- Process an S3 event
- Creates a list of Size objects from a file
- Generate a test route
flask-images Key Features
flask-images Examples and Code Snippets
Community Discussions
Trending Discussions on flask-images
QUESTION
I've built a flask site and it's been working for over a year, but I've just encountered an image that is not correctly resizing when using flask images to generate a resized image. The static image loads correctly, so I can only assume it's an error with the flask-images resizing. I can't find any way to see the exact error and so I'm kind of stuck in troubleshooting. Any help would be greatly appreciated.
Error: The image [image] cannot be displayed because it contains errors.
Example of broken image:
Functioning static resource: https://www.eskimotv.net/static/img/cover-images/zack-snyder-s-justice-league-still-sucks-2021-cover-image.jpg
Example of it working fine for other images:
Static resource: https://www.eskimotv.net/static/img/cover-images/hellboy-2019-cover-image.jpg
Resize code:
...ANSWER
Answered 2021-Apr-13 at 02:47Issue 1: Regarding finding and viewing the error: I was able to find and view the error generated by pillow by running the flask server locally and viewing the log. I will add the full error to the question.
Issue 2: Regarding the issue with the image. The image generating the error had an alpha layer of some kind from when it was saved to the static directory even though it was being saved as a jpg. While I do not have transparency into the flask-images method for generating cached resized images, I did have access to the method that saved the external image to my server. So, when saving the static content, I simply added this line in the method for saving images locally to convert the image before saving it:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flask-images
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page