Corrupted Pictures (half grey) in Nextcloud but fine when Downloading

Hello Together!

Hopefully someone knows the following or has at least an idea where to look at :slight_smile:

As soon as I try to retrieve images from Nextcloud, many of them are gray to some extent. The error occurs on my desktop as well as in the mobile app, but not on all images.

Nextcloud version: 15 (but also on 14)
Operating system and version: Ubuntu
Apache or nginx: Apache 2

The issue you are facing:
As soon as I try to open pictures on Nextcloud they seem to be corrupted. (Desktop and Mobile App) Most of the pictures are more or less half grey (not all of them). This applies to the thumbnail and for the opened picture. The original file and also the downloaded one (through Nextcloud) is fine and has no error. The pictures lie on an external storage NAS.
The behavior does not happen always but is consistent for the same pictures (so reloading leads to the very same picture with a share of grey), but is not happening for all pictures. I am not sure wether it is the case or not but I find some connection between the size and the error as bigger pictures are more often affected by it. Furthermore mostly (if not all) pictures uploaded through Nextcloud itself are fine.
It does not make a difference if I generate the thumbnail when accessing the folder or install the preview generator app (yesterday) as this does not change the behaviour.

Is this the first time you’ve seen this error?: No

Steps to replicate it:

  1. Open Picture folder on Nextcloud
  2. Look at Thumbnail
  3. Open picture

I could not find anything similar online, if there is already something, I am happy to read and try.
Thanks in advance!

Are those pictures JPGs in CMYK format?

The pictures are not explicitly transformed that way. They are also from different sources (normal digital cameras, iPhone, Android, GoPro) and some years old and some uploaded yesterday.
Neither makes a difference. But if you can tell me, how I can verify it, please let me know!

This is also happening to me. Is there a way to delete the preview or thumbnail images? Or are they created on the fly and removed each time at run-time? I wonder if just recreating the previews would work. I am not using the Preview App. I could even send a test image that it is happening to. Seems to be random because all were taken from the same source. Also note, I am on the latest version of the server using the official docker image along with mysql and nginx reverse proxy.

Edit: If I re-upload the file then the preview and thumbnail are fixed. This is not really a solution to fix it though. I have uploaded 100GB+ of data and it seems to be happening pretty randomly between all of it. My only guess here is there was an error during the preview generation (maybe due to low resources) and it errored when creating them. Think the simplest solution would be to remove the generated previews and see if it happens again. Can someone fill me in on how to do that?

I can confirm this is still happening even on new uploads without resource issues. Anyone have any ideas?

I’m also running into this problem. It seems like Nextcloud is corrupting the images on upload for me.

I’m running Nextcloud 17 and Nextcloud Sync 2.6.2 for Linux.

Here is a sample of an image before and after:



Same problem here. Any updates on this?

I also encontered this Problem. But only after reinstalling my Nextcloud about a week ago.