Forum
Gallery app not adding resized image copies
On uploading new images, the admin images seem to load fine, but on the frontend of the site they do not load. It does not appear to be creating the additional resized copies.
short diagnostic report
Summary information
Perch: 3.0.13, PHP: 5.5.9-1ubuntu4.22, MySQL: 5.5.58, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (3.0.13), assets (3.0.13), categories (3.0.13), perch_forms (1.10), perch_gallery (2.8.9)
App runtimes: <?php $apps_list = array( 'perch_forms', 'perch_gallery', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /usr/share/nginx/sites/panther/perch
PERCH_CORE: /usr/share/nginx/sites/panther/perch/core
PERCH_RESFILEPATH: /usr/share/nginx/sites/panther/perch/resources
Image manipulation: GD
PHP limits: Max upload 40M, Max POST 40M, Memory: 128M, Total max file upload: 40M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /usr/share/nginx/sites/panther
HTTP_HOST: panther.furycodes.xyz
gallery.php
<div class="prod">
<?php perch_gallery_albums(array(
'template' => 'album.html',
'image' => true,
)); ?>
</div>
perch/templates/gallery/gallery.html
<perch:before>
<perch:gallery id="description" type="textarea" textile="true" class="description"/>
<ul>
</perch:before>
<li>
<p class="title"><perch:gallery id="imageAlt" /></p>
<div class="slide-wrap">
<img src="<perch:gallery id="main" />" alt="<perch:gallery id="imageAlt" />" class="small"/>
</div>
<img class="gal-img" src="<perch:gallery id="main" />" alt="<perch:gallery id="imageAlt" />" class="active"/>
</li>
<perch:after>
</ul>
</perch:after>
perch/templates/gallery/image.html
<perch:gallery id="image" type="image" key="small" width="640" height="360" crop="true" />
<perch:gallery id="image" type="image" key="main" width="1280" height="720" />
<perch:gallery id="image" type="image" key="thumb" width="160" height="160" density="2" crop="true" />
<perch:gallery id="desc" type="textarea" label="Description" size="s" markdown="true" editor="simplemde" />
Hi Thomas,
It seems you're referencing the wrong template. In
gallery.php
, you're using'template' => 'album.html'
instead ofgallery.html
.Here's the content of that file:
perch/templates/gallery/album.html
and the html output for the image tag:
(the alt it's printing was part of the filename for the image that was generated by the camera)
Have you tried it with the default templates?
Yes, they don't work either.
For additional context, this was after upgrading from 2.x -> 3.x and moving to new server -- all the images uploaded before that work fine and still show up; new images do not.
So, previously I was using imagemagick as the backend. I commented out this line and it works now for new uploads.
Although I have imagemagick, imagemagick-core, and php5-imagick installed and enabled. IMO it should throw an error or detect a problem instead of just failing silently.