Image scales broken

We've had a couple instances recently in Plone 5 sites that the various image scales stopped working. The first time this happened, I was able to resave all the Images (it was a small site), and that fixed the issue.

Now it's happening in another site (Plone 5.0.6), and resaving isn't working, plus this site has a lot more images.

Some of the scales are working, like:

  • 7994652-dr.gif/@@images/image/preview
  • 7994652-dr.gif/@@images/image/

But others are not:

  • 7994652-dr.gif/@@images/6ae40958-9545-4d3e-ac4d-625fd9cda4d3.jpeg
  • 7994652-dr.gif/@@images/image.gif

Accessing these urls directly either gives a login screen or Insufficient Privileges. These are the paths used on the image_view template, and image_view_fullscreen template.

As far as I know, there is not an easy way to recreate the images scales like there was with Archetypes. Or could this be a completely different issue?

1 Like

This type of errors suggests a problem with permissions (and not the image scales themselves). You could try:

  • acessing these urls as a Zope(/Plone) "Manager" (do the errors disappear?)
  • configure "verbose security" - this usually gives good hints for the analysis of permission problems.

Having something similar happen.

.../image.png <== renders fine

.../image.png/view <=== produces blob error
.../image.png/@@images/c806fdde-ba77-4f61-b891-cd916d6b7865.png <=== produces blob error

  Module ZEO.ClientStorage, line 1020, in loadBlob
POSKeyError: 'No blob file'

Started occurring in a folder that was cut and paste elsewhere in the site.

This does not look like a permission problem but some problem at the ZODB level: "blob"s are maintained as files on the file system and apparently for one of the blobs referenced in the failing requests the corresponding file is missing.

Reasons can be various. The most natural one: the file was inadvertantly deleted. Potentially, you see also the effect of hardware problems or file system, ZODB or "copy-paste" errors.

Apparently, the image itself is still accessible -- i.e. the elementary information; what seems to be missing is something secondary. This means, you should be able to recover. I would carefully look at the traceback to find out what exactly was lost and determine from that how to get it back.

As in your case, the affected image was copied, you could delete the copy and retry the copy-and-paste operation. If the error should persist, many reasons from the list above could be excluded (e.g. file deleted, hardware problems, ...).

Could it be that you have pasted between different mountpoints or done the copy/paste in ZMI.... and then deleted the original image ?

Thanks for the response. I was thinking that perhaps the scales for the image might have been lost. I've tried recreating the scales for any images in that directory downward, and the blob issue persists. As you suggest I'll dig through the traceback a bit deeper.

I am not sure if any of those are scales: the /image is the image itself, and the preview might be 'rendered another way'.

I know that with PIL setups WITHOUT jpg and png support, the /preview is still working (this has happened when I setup Plone on a new Mac)