Expected the file to have mimetype image/jpeg
, but found a file with mimetype image/png
#3065
-
Hi, I have a news aggregator site that grabs an image from a remote URL but the script is breaking with the following error when I try to crop the file after grabbing:
I have no control over this image so I was wondering if there is a way to either correct the mimetype or to catch the error and remove the offending article? Thanks in advance for your help edit:
and then running:
The model has the following function:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To anyone struggling with this in the future, I solved this with:
|
Beta Was this translation helpful? Give feedback.
To anyone struggling with this in the future, I solved this with: