Can't resize special images: unexpected EOF


EDITED: source file

{{ $res := resources.Get "sample.jpg" }}
{{ $res.MediaType }}
{{ ($res.Resize "100x").Permalink}}

What’s wrong with this image, once I reconverted it to jpg via GIMP, and then it works.

Please post a link to the original image. Discourse modifies image you post.

1 Like

Using ImageMagick’s identify tool:

$ identify -verbose inventaire.jpg

identify-im6.q16: Premature end of JPEG file `inventaire.jpg' @ warning/jpeg.c/JPEGWarningHandler/389.
identify-im6.q16: Corrupt JPEG data: 5 extraneous bytes before marker 0xd9 `inventaire.jpg' @ warning/jpeg.c/JPEGWarningHandler/389.

We could raise an issue with the Go team, making a case that somehow this corruption should be ignored because “it works in the browser”, but if I were them, I would tell you to fix the file.

1 Like

hi, yes , good identification of the problem origin.
I have plenty of those images for my app and it is the 1st time I see that they are incorrect.
I should not be alone having that issue in images -
but even if I post an issue now, I will still have the existing picture to place …

I tested all my screenshoot tools : and none produce such an error - may be my replication tools - sorry for the issue and thanks for the indication how to identify images with problems

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.