Image don't display in Plone

We can't get any images to display in Plone. We thought it was because we didn't have certain Python libraries installed, but that hasn't fixed the problem. We're at a loss at the moment. The images that we previously uploaded are still in Plone, but they will not display.

I'm assuming you are able to see the original size of the images, just not the scales. If you edit an image and save it, do the images display?

Also, are the Images Archetypes or Dexterity, and what version of Plone are you using?

I have seen this behavior, in my case it had something to do 'Safe html'

Try disabling html filtering at:

to see if that is the case (you probably should not keep the setting off)

We have Plone 5.07. We can't see anything related to the images except the name we gave them. When you double-click on one we get a message that says, "Image cannot be displayed"

I'm still suspecting a Python library. Our engineer said he installed libpng12-dev and libjpeg62-dev, but maybe there are others that need to be installed. Everything was fine until our team performed an update of some sort. They got a lot of add-ons installed, but we lost images somehow.

I turned HTML filtering off. That didn't help. I've turned it back on.

Are there any errors showing up when you run buildout?

I will have to get one of our engineers to run buildout and report what happens to me. We are a startup and so everyone is wearing multiple hats, which is why I'm here asking questions instead of one of our more technical team members. They are swamped unfortunately.

Try deleting the Pillow (PIL) egg from your buildout and re-running it. If it was built before the png and jpeg libraries were available, it won't have the required support. Also, make sure you have the -dev or development versions of the imaging libs. The dev versions have header files that are required to build supporting modules like Pillow.

1 Like

Thanks for your suggestion, SteveM. This is what I suspect the issue is. I've requested that this fix be attempted. I'll post the result.

To narrow things down:
Is it just the scales of the images you can not display?

Can you view the original image

... and maybe http://path/to/the/image/@@download to check that 'not something has happened to the file itself).

probably related with ths:

I can see the images when I edit them. And I can download them. So the files are fine. They just won't display in pages, even in Edit mode. I really think it is a Pillow thing.

I would not be so sure: Pillow is used when making scales: if you place the full image in the body text and it does not show, it is probably not Pillow.

You could also try to use an external image
<img src="http://some/other/place.jpg"

When I place the original image in the page, it displays. I've only just realized this. But if I apply any scaling to it, it does not display. This seems to me to be further indication of a Pillow issue.

Does resetting the Pillow functionality involve first running buildout without the Pillow egg and then running it again with the Pillow egg?

Our engineering team says they re-installed Pillow and restarted the server, but scaled images still do not display.We're at a loss at present to know how to resolve the issue.Is it possible plone.scale isn't installed? Is that package part of the core?

When they rebuilt Pillow, it should have shown a list of its capabilities (based on the headers and libraries available to it). Did it say that it could handle PNGs and JPEGs?

Let's try some tests. Did you buildout put a zopepy executable in ./bin? If not, add a part like:

# installs a zopepy python interpreter that runs with your
# full Zope environment
recipe = zc.recipe.egg
eggs = ${buildout:eggs}
interpreter = zopepy
scripts = zopepy

and run buildout. Then run bin/zopepy, which is just a Python prompt with all the Plone modules available. Try:

from _imaging import jpeg_decoder
import zlib

If these fail, you're lacking jpeg or png support.

This the the summary you are talking about, I think:


version Pillow 3.4.2
platform linux2 2.7.12 (default, Nov 19 2016, 06:48:10)

         [GCC 5.4.0 20160609]

--- JPEG support available
*** OPENJPEG (JPEG2000) support not available
--- ZLIB (PNG/ZIP) support available
*** LIBIMAGEQUANT support not available
*** LIBTIFF support not available
*** FREETYPE2 support not available
*** LITTLECMS2 support not available
*** WEBP support not available

*** WEBPMUX support not available

It seems to say jpeg and png support is there, but they don't display when scaled.