Forum
Density in gallery app
Hi
I'm re-coding an old site using gallery into a responsive bootstrap build and as there are over 3500 images and the width of the images is larger I thought adding density and img-responsive would give me the larger images I need from the original re-sized images.
But I'm finding both density="1.3"
and class="img-responsive"
aren't applying to the images, if I view the source they are listed, but not applied;
<img src="/perch/resources/20151217_132933-w780h585.jpg" width="780" height="438" class="img-responsive" density="1.3" alt="20151217_132933">
My full template is;
<perch:before>
<h1><perch:gallery id="albumTitle" /></h1>
<ul class="slideshow">
</perch:before>
<li>
<img src="<perch:gallery id="main" />" width="<perch:gallery id="main-w" />" height="<perch:gallery id="main-h" />" class="img-responsive" density="1.3" alt="<perch:gallery id="imageAlt" />" />
</li>
<perch:after>
</ul>
</perch:after>
Am I doing something wrong as I haven't used gallery for a while, or does class and density not work with gallery
Perch: 3.0.9, PHP: 5.5.38, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, with PDO
Server OS: Darwin, cgi-fcgi
Installed apps: content (3.0.9), assets (3.0.9), categories (3.0.9), perch_blog (5.6.1), perch_gallery (2.8.9), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'perch_blog', 'perch_gallery', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/hoops78/Documents/marpave/root/perch
PERCH_CORE: /Users/hoops78/Documents/marpave/root/perch/core
PERCH_RESFILEPATH: /Users/hoops78/Documents/marpave/root/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /Users/hoops78/Documents/marpave/root
HTTP_HOST: marpave
Gallery is fairly old and doesn't support any of the newer features for asset handling. It has its own implementation for image sizing.
Ok, thanks.
Can you think of a way I could enlarge existing images?
Do you still have the original full size files in place?
I should have... so I specify these instead and add some css to make them responsive... I'll give it a try.
ps. the image in the forum reply email is missing.
I've removed the width and height to the images, so I just have;
and added responsive css to the images, but my outer slideshow ul is still setting at 788px... which was the original width for the images, do I need to change something elsewhere? Sorry, its been a while since I used Gallery and can't remember what I did when setting it up.
Ah, I see its still using the 780px version and with 4px border its making the 780px width, I've removed the width from image.php for "main", do I need to do anything else to use the original image rather than a resized one?
Source example;
No, I think that should do it.
OK, I'll keep looking into it. I thought that was enough, but its still using the resized versions of the images.
I've added a new line in the image.php;
and edited my template to use the new mainNew and created a new gallery and that works, but I can't get my template to use the original un-resized version of the image.
To re-cap, I've taken the width and height out from the gallery template and removed the width and height from the image.php but it still uses the re-sized version of the image. I've cleared the cache and tried a different browser just in case.
Any other suggestions?
You can fake the density with just bigger pix. I'm extending gallery to switch to responsive sizes. The key="mainNew" or key="small" is the way to select responsive sizes.
What does
key="original"
give you?Thanks Drew, "original" works
Ian - Thanks for the suggestion, but there are over 3500 existing images in multiple albums.