Path

ez.no / ezpublish / documentation / configuration / troubleshooting / images do not work


Images do not work

These documentation pages are no longer maintained. Please visit the new documentation site.

You've gotten eZ publish successfully installed, but you cannot see any images. Here are some hints to what you should check.

File permissions

eZ publish needs to create files when you upload images and when images are converted. This means that the apache ( webserver ) user needs to have write permissions to the directory var/storage/ and it's sub directories.

Image conversion program

eZ publish can convert images with one of the two programs GD and ImageMagick. Check that these are correctly installed and working. Check your image settings in the configuration file settings/image.ini. (Note that if there is an image.ini.append/.php in /settings/override you have to make changes there instead of the main image.ini!)

[If your ImageMagick was detected by the setup guide, but still won't work, check the Sub-Document.]

Safemode and open_basedir

eZ publish does not work properly under safemode and/or with open_basedir restrictions. These needs to be turned off.

Image classes not available to eZ

If you only see a Link and not the image it could be that you do not have the image display classes.
Copy embed_class_5.tpl and text_linked.tp' from /design/admin/override/templates/content/view to override/templates/content/view/ in Example:

cp /ez/design/admin/override/templates/content/view/* /ez/design/myfiles/override/templates/content/view

Uploading new images

If you have no problems with images from demo design, but you can't upload new images or change existing images in demo design, check first settings in php.ini file. In the part File Uploads ought to be:

file_uploads = On

For more informations about php.ini settings see here.

Incorrect image size for conversion

If you have images in your original and reference directories then the problem could be you image sizes. Ensure you have sizes for both height and width in your site.ini.php file. Without both sizes image convert will fail.

Image Scaling (incl. "ScaleLargerThanOriginal")

There is a setting called "ScaleLargeThanOriginal" (formerly: "ScaleLargerThenOriginal"), which you can set to "false" in order to limit an image variation size to the original size (so the variation will never be larger than the original image).

This setting is only used with ImageMagick's "convert". It is ignored, when you use the PHP-built-in GD for image handling.

Note: When "ScaleLargerThanOriginal" is set to "false", then command line used to call "convert" includes a ">" character (which tells convert "don't enlarge").
For example, the call to convert looks like this:
home/usr/bin/convert -geometry "150x150>" inputfile outputfile
As the > character usually means an output redirection on OS-level, it may cause trouble (read: error) in some situations. Particularly, this will fail, when safe mode is on. But there are other situations known (and not yet solved), where this causes an error, despite safe_mode being off. An error here means, that ezPublish cannot create a reference image and so, no image variation can be created. The original image file is uploaded nicely, but you will not see anything on your website, except, when you use the image-size "original".

GD fails to display image in compiled php

If you have --with-gd try adding --with-jpeg-dir to your configure string.

If you've found a solution to a problem regarding image conversion, please add it to this page.

Comments

3.5.2 image not displaying

3.5.2, image is not displaying in website, but when we edit in admin part the image is displaying...

Any one have any ideas?

I have used this coding:

$node.object.data_map.resource_image image_class="large"

Errorcode with ... -geometry "150x150>" ...

Exec: home/usr/bin/convert -geometry "150x150>" var/storage/reference/image//bqOnp1.jpg jpg:var/storage/variations/image/b/q/O//bqOnp1_150x150_297.jpg, Err: , Ret: 127

got this errorcode, on one site on the same server it was working, on the second site not. Merging of the settings gave this result in site.ini(.php):

[SiteAccessSettings]
[...]

# An array of access types which are tried, possible entries are: host, index, uri and port
MatchOrder=uri;host;port

# Possible values: disabled, element or regexp
# disabled - turns off uri matching
# element - maps a url element to a siteaccess name
# regexp - match against a regexp and extract a portion of it
URIMatchType=element
URIMatchElement=1
URIMatchRegexp=^/([^/]+)/
URIMatchRegexpItem=1

# Use either disabled, map, element, text or regexp
HostMatchType=map
HostMatchElement=0

####### HERE: take Your domain!!!!
HostMatchRegexp=^(.+)\.example\.com$
HostMatchRegexpItem=1
HostMatchSubtextPre=

####### HERE: take Your domain!!!!
HostMatchSubtextPost=.example.com
# Add array entries here if you chose HostMatchType=map
# Each entry consists of the hostname;accessname
#HostMatchMapItems[]=example.com;user
#HostMatchMapItems[]=admin.example.com;admin

[...]

that's all,

Greetings, ekke

Contents

Configuration

Configuration
Security
Optimization
Backup & Restore
Troubleshooting
    404 - Page not found
    Change the right configuration file
    Debug popup window infinite loops
    eZ publish 3 and Apache 2
    Getting looped back when logging in
    Giving you back the admin rights
    I need to reindex my site for search.
    Images do not work
       You are sure, that you have ImageMagi...
    Mixing up node id and object id
    Not enough PHP memory
    Open_basedir restriction
    Permissions of cache files
    Problems with the translation function
    Process cache enabled reduces perform...
    User site instead of admin site
    Warning: Failed to write session data...
    What not to do with eZ


Created

02/05/2003
9:31:11 am
by Tony Wood

Last updated

28/09/2003
2:19:42 pm
by Marco Zinn

Authors

Tony Wood
Wincenty Elsner
Bård Farstad
Marco Zinn



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.