-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hello.
I've faced an issue when image size can't be obtained for images with wrong extension (for example jpeg image format with PNG extension). Yes, I know it is not normal to have image with wrong extension, but sometimes it happens.
I found this issue parsing "Lullabot\AMP" issue (laravel). It doesn't convert "img" tag to "amp-img" when image size is undefined. So I have a solution, but I think there could be better one.
So my simple solution is for class "FastImageSize", function "getImageSize" you can add this to end of else statement:
if(!(sizeof($this->size) > 1)) { $this->data = ''; $this->getImagesizeUnknownType($file); }
Thanks.
Metadata
Metadata
Assignees
Labels
No labels