You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most other images work. To note these are both from wordpress sites. The images were saved out of Photoshop (Save for Web & Devices) which means they were properly compressed and then uploaded to Wordpress.
Any help appreciated!
The text was updated successfully, but these errors were encountered:
After hours debug, checking the image-resize code and googling around. I found this possibly is the reason:
The server may not support chunk download. Nodejs doesn't recognize this and thinks that the downloading has finished normally, then it triggers the .on('end') event. Thus, the buffer you get is only a few bytes. It doesn't meets the requirement that the jpg TypeMap needs (4096). It will consider this unsupported type. https://github.com/image-size/image-size/blob/master/lib/types/jpg.js
I have tried with your image links. It seems that we have the same issue. Your first image chunk size is 438 bytes. Clearly not enough for image-size to work properly.
Refs: nodejs/node-v0.x-archive#6143 where SteveJobzniak listed out possible causes that the server closes connection in the middle.
I downloaded the files locally, the ran image-size against them, & got the correct dimensions .. So, it's possible that @anhreg said applied to @digitalmc as well..
I get the following error when I try to get the image size of select images:
unsupported file type: undefined (file: undefined)
Below are a list of two of the image in question:
Most other images work. To note these are both from wordpress sites. The images were saved out of Photoshop (Save for Web & Devices) which means they were properly compressed and then uploaded to Wordpress.
Any help appreciated!
The text was updated successfully, but these errors were encountered: