11

All of a sudden I'm getting errors when I save jpeg or png files with Google Chrome on Ubuntu, then try to open them.

If I use Firefox, saving the images to Desktop and opening them is NOT a problem.

I've tried several different websites just to make sure it's not the website. I've also asked others to open it on their computers (with Ubunutu installed) and they said it opened fine (of course, I forgot to ask if they were using Chrome at the time).

Here is the error I get when trying to open the file:

Error interpreting JPEG image file (Not a JPEG file: starts with 0x52 0x49)

when I run the file command on several different files form different sites:

file Verlag_Poster_Large_23.jpg
Verlag_Poster_Large_23.jpg: RIFF (little-endian) data

file R-2153295-1287083265.jpeg.jpg
R-2153295-1287083265.jpeg.jpg: RIFF (little-endian) data

file cover.jpg
cover.jpg: RIFF (little-endian) data

edit: Not 100% yet, but I think it was the Wappalyzer extension. I "reloaded" it and now it's fine but will keep it watched.

9
  • Can you run the command file the-jpg-that-gives-the-error.jpg and paste the output in your question?
    – Sh1d0w
    Apr 8, 2015 at 12:13
  • No problem, added output of file command.
    – echo
    Apr 8, 2015 at 12:36
  • It seems that this image is not a valid JPEG image. It is most like a chunk of file, not the whole file (you can read more about RIFF). For some reason chrome is not downloading the whole image or maybe you did not waited the download to finish? Do you have any plugins? Also from where did you install Google Chrome? Which version are you using?
    – Sh1d0w
    Apr 8, 2015 at 13:04
  • It does it to ALL files I save with Chrome. I am most definitely waiting for the file to complete. It's weird, it's been doing it for a little while but now it's all the time. Is there anything in my "user data" that I can clear out? I think Chrome is running out of space or something. Of course, I could be totally wrong about this. I'll get back to you on those questions shortly.
    – echo
    Apr 8, 2015 at 13:09
  • Ok after you answer previous questions can you also post the output of this command in the question df -h and also tell me where are you downloading the files? On your home partition or on external hard drive? If it is home partition if you have an usb drive can you plug it in and try to download to it with "Save As" option. Thanks.
    – Sh1d0w
    Apr 8, 2015 at 13:17

2 Answers 2

26

Actually, if the file starts with "0x52 0x49", then it's a .webp image. Just replace the file name extension from 'jpg' or 'jpeg' with 'webp'. If you'd like to convert it to a 'jpg' or 'png' then open it with something like Gimp and re-save the image in the desired format.

P.S. Yes I know this question is old but it's the first in the list of answers so it should have the correct information.

Regards, Professor Techie

4
  • 4
    This should be an accepted answer. Jun 29, 2018 at 16:20
  • 3
    gimp appears unable to open .webp files ... i get this message: "failed: Unknown file type"
    – abcd
    Jul 1, 2019 at 14:13
  • Thanks - this worked for me. I renamed the extension to webp, opened it in GIMP and exported it as a jpg.
    – Jaydin
    Sep 24, 2019 at 22:25
  • That is right, is a webp format! en.wikipedia.org/wiki/WebP ImageMagick is abled for it, but first install webp libraries (I use Debian but tested at Ubuntu 180.04) sudo apt install webp After use: convert file_image.webp file_image.png More options: imagemagick.org/script/webp.php Dec 31, 2019 at 21:23
2

After short investigation it seems like the files never finished the downlod process completely and was left as chunks.

Disabling all chrome plugins seems to fix the problem, it is up to the author to find which one is causing the problem.

1
  • Actually you just rename the file from .jpg/.png to .webp and you should be able to open it in a browser
    – xjcl
    Nov 14, 2020 at 20:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .