Announcement

#1 2019-10-11 16:23:07

kc27
Member
2014-02-25
75

Unable to Set Default Image Size in Piwigo 2.10

Here is the info on my Piwigo installation.

Piwigo 2.10.0
Operating system: Linux
PHP: 7.3.10 (Show info) [2019-10-11 14:08:10]
MySQL: 5.5.5-10.2.27-MariaDB-cll-lve [2019-10-11 10:08:10]
Graphics Library: GD bundled (2.1.0 compatible)

Via the Local Files Editor plug-in, I have this line in my config.inc.php file
$conf['derivative_default_size'] = 'medium';

The "Medium" setting is being ignored when the user views the gallery.

In Windows Chrome version 77.0.3865.120, the default image size is Large.
In Windows Firefox 69.0.1, the default image size is Extra Large

If the user manually changes the image display size to "Medium" from the image size drop-down, the next image viewed goes back to either Large or Extra Large, depending on the browser they used.

Offline

 

#2 2019-10-12 02:11:21

executive
Member
2017-08-16
1099

Re: Unable to Set Default Image Size in Piwigo 2.10

are you using any auto size plugins?

Offline

 

#3 2019-10-12 04:06:47

kc27
Member
2014-02-25
75

Re: Unable to Set Default Image Size in Piwigo 2.10

Thanks for the response. I just got this sorted out. It was a theme issue. Bootstrap Darkroom gave my users the ability to select an image size and have it be retained. After the upgrade, users were getting the Modus theme. I had set up the gallery months ago, and should have documented all the settings and configurations I had made. If I had, I would have realized immediately that I had lost some of my gallery settings, including the theme.

I got side tracked because after the upgrade, I spent a lot of time with the "Some checksums are missing." after upgrade to 2.10 issue that was brought up in the forum, only to find out that the "Some checksums are missing." alert does not apply to my gallery, because I had uploaded my images via FTP.

Once I dropped the checksum issue and started digging into the gallery set up, I realized that Modus had become the default theme, and that was the reason for the image size behavior. After fixing the gallery, I am documenting the configuration so I have a reference tool for the next Piwigo upgrade.

Last edited by kc27 (2019-10-12 04:07:25)

Offline

 

#4 2020-06-11 11:51:08

groovygeek
Member
2020-06-08
9

Re: Unable to Set Default Image Size in Piwigo 2.10

I have the exact same issue with Piwigo and modus theme (grey skin).  In the local config I have
$conf['derivative_default_size'] = 'large';
which seems to be ignored.

See for example
http://bboyanov.com/gallery/index.php?/ … california
where all images are shown original size.  This causes some of them to run off the end of the window.  No autosize plugins.  I have
- AMM
- PWG stuffs
- Local File Editor
-Permalink Generator
- Extended Description

Offline

 

#5 2020-06-11 16:16:28

kc27
Member
2014-02-25
75

Re: Unable to Set Default Image Size in Piwigo 2.10

The first 10 photos came up for me as either Large or Original size. I am running Windows 10. I did notice that the number of available sizes differed for some of the photos, but you did always have Large size listed among the available sizes. Maybe the available sizes have to be consistent among all photos in an album? Just a guess.

http://www.clemke.com/misc/pwg/image_sizes.jpg

Offline

 

#6 2020-06-11 23:00:18

groovygeek
Member
2020-06-08
9

Re: Unable to Set Default Image Size in Piwigo 2.10

Possibly. At the moment I am papering over this with

Code:

#theImage img{
    object-fit: contain;
    height: auto; 
    width: auto; 
    max-height: 750px;
    max-width: 1200px;
    margin:0 auto;
}

Offline

 

#7 2020-06-14 11:21:28

groovygeek
Member
2020-06-08
9

Re: Unable to Set Default Image Size in Piwigo 2.10

Actually it turns out that the above hack is not a good one, as it messed up the image maps that control advancing through the gallery when you click on the left/right side of the image.  When you take an original image and resize it the mapping applied is still mapOriginal, but now the coordinates are all wrong.

So the question stands - is there a way to force Piwigo to load a specific image size?

Code:

<?php
/* default image size */
$conf['derivative_default_size'] = 'large';
?>

does not appear to work.  I did delete all images sizes from the galleries to seee if that is the problem, but it still loads all images as "original"

Offline

 

#8 2020-06-16 08:05:25

kc27
Member
2014-02-25
75

Re: Unable to Set Default Image Size in Piwigo 2.10

This thread, titled "Is any real way to maintain default view size in picture page?" contains a solution. I have not tried it, however. Might be worth a shot.

https://piwigo.org/forum/viewtopic.php?id=26759

Offline

 

#9 2020-06-17 10:34:38

groovygeek
Member
2020-06-08
9

Re: Unable to Set Default Image Size in Piwigo 2.10

Thanks, will try it this weekend

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2021 · Contact