VernissageApp / VernissageServer

Application which is main API component for Vernissage photos sharing platform.
https://vernissage.photos
Apache License 2.0
9 stars 0 forks source link

[ WARNING ] Cannot create image for resizing. #31

Open mgrzeca opened 5 months ago

mgrzeca commented 5 months ago

The above error occurs when attempting to upload certain images as an avatar or profile header. I'm attaching a sample avatar that triggers this error.

428691_10201138668694664_1392948851_n

mczachurski commented 5 months ago

Error occurs because this image is a PNG image but the extension is *.jpeg. When you rename file as .png or convert it to real .jpeg then everything is working.

The library for creating image in the memory cannot recognise that image as jpeg and returns exception. Maybe I can try first with user extension of the file and if library fails then I can rename it (from jpeg to png or from png to jpeg) and try again. But I'm not sure about this yet.

mgrzeca commented 5 months ago

OK, my bad...

Why won't you let the underlying image library detect the image type on its own?

Zrzut ekranu 2024-04-10 o 11 34 18
mczachurski commented 5 months ago

I will try to figure out something here. I'm not sure that I want to support all of these types: bmp, gif, jpg, png, tiff, tga, wbmp, webp. On the other hand, it is better to support more than less 🤔.