Announcement

  •  » Themes
  •  » Modus theme shrinks small images by 60% when plenty of space

#1 2022-12-03 10:32:50

travelsignposts
Member
2015-02-02
19

Modus theme shrinks small images by 60% when plenty of space

Hello all,

I have some images that are small (500x326) that are being displayed as 300x195 on the photo page, i.e 60%, even though there is easily space to show full size (e.g. using 1272x1024 window) . When I click on the already ticked original size choice in the drop-down size menu, the image immediately refreshes to the correct dimensions. If I reload the page, the photo is again resized down.

Other larger photos are correctly scaled to the page.

What I want to ensure is that any smaller photo is not resized automatically, but allowed to fill the available space at its original size.

I understand that Modus has some kind of autoresize built-in, which appears to work well on larger images, but seems to fail on smaller ones.

Any ideas?

Piwigo 13.2.0
Operating system: Linux
PHP: 7.4.33 (Show info) [2022-11-27 06:55:08]
MySQL: 5.5.5-10.3.37-MariaDB [2022-11-27 01:55:08]
Graphics Library: External ImageMagick 6.9.10-68
Cache size 9884.6 Mo   calculated 3 days ago Refresh
Activated plugin list32
Add < head > element
Admin Tools
Advanced Menu Manager
Batch Manager, Photo Description
Exif View
Extended Description
Grum Plugins Classes.3
GThumb+
Header Manager
Language Switch
Language Switch Menubar
LocalFiles Editor
Meta Open Graph
OpenStreetMap
Panoramas
Permalink Generator
Perso Footer
Personal Favicon
Personal Plugin
PWG Stuffs
Read Metadata
Reset manual order
RV Akismet
RV autocomplete
RV DB Integrity
RV Menu Tree
RV sitemap
SmartAlbums
Social Buttons
Statistics
Tag Groups
Take A Tour of Your Piwigo

Piwigo URL: https://www.travelsignposts.com/destina … ry/albania

Offline

 

#2 2022-12-03 10:38:30

Katryne
Member
2016-12-03
370

Re: Modus theme shrinks small images by 60% when plenty of space

Hello, have you tried to modify the settings of GThumb+ ? The solution may be there.


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#3 2022-12-03 10:56:59

travelsignposts
Member
2015-02-02
19

Re: Modus theme shrinks small images by 60% when plenty of space

I looked at that, but I thought it only dealt with thumbnails, and they are OK AFAICS.
Am I missing something?

Offline

 

#4 2022-12-03 11:01:36

travelsignposts
Member
2015-02-02
19

Re: Modus theme shrinks small images by 60% when plenty of space

My GTThumb+ settings are:


Thumbnails max height :    
250 px
Margin between thumbnails :      
5 px
Number of photos per page :      
20
Double the size of the first thumbnail :       No
Cache the big thumbnails (recommended) :        Yes
Scale thumbnails :        Crop
Show thumbnails caption :        Yes
Show rating score in caption :        No

Offline

 

#5 2022-12-03 11:18:12

Katryne
Member
2016-12-03
370

Re: Modus theme shrinks small images by 60% when plenty of space

When I met the issue with Modus, I just remember having noted something for a fix :

Allow display in original size
In the user management, check the box: allow downloading. Don't forget to set the permissions for unregistered/logged in visitors, it's in a separate tab : Guest.

Of course, this looks strange to configure the display mode with a download setting, but it seemed to be my solution at the time.


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#6 2022-12-03 15:12:17

travelsignposts
Member
2015-02-02
19

Re: Modus theme shrinks small images by 60% when plenty of space

Hi Kathryne,
Thanks for the response!
I quickly tried your tip to allow downloading in user and guest management, but so far no change.
I've noticed that if I reselect Original (it's already ticked) in the resize menu, the image goes to Original size.
It's past midnight here in Australia, so I'll come back to this later in the morning...

Thanks so much for your help,

Tony

Offline

 

#7 2024-03-22 09:11:08

travelsignposts
Member
2015-02-02
19

Re: Modus theme shrinks small images by 60% when plenty of space

I'm coming back to this topic as I still don't have a solution.
There was a suggestion that in the modus photo.autosize.js the DPR=2 was a possible culprit:

Code:

function rvas_get_scaled_size(d, available) {
  var ratio_w = d.w / available.w
    , ratio_h = d.h / available.h;
  if (ratio_w>1 || ratio_h>1) {
    if (ratio_w>ratio_h)
      return {w: available.w / available.dpr, h: Math.floor(d.h / ratio_w / available.dpr)};
    else
      return {w: Math.floor(d.w / ratio_h / available.dpr), h: available.h / available.dpr};
  }
  return {w: Math.round(d.w / available.dpr), h: Math.round(d.h / available.dpr)};

but the solution proffered, to lose the "available.dpr" :

Code:

return {w: Math.round(d.w), h: Math.round(d.h)};

has not worked for me. I even tried removing "available.dpr" throughout the whole section, but again, no luck.

Larger photos work fine, being initially resized to fit the window correctly, but with smaller images the auto resizing makes them miniscule. I understand why this is not a pressing problem for the Piwigo coders, it only affects my older photos before we all moved up in size, but I do have a quite few thousand of these online so I'd like to find a solution!

All ideas gratefully received...

Tony

Offline

 
  •  » Themes
  •  » Modus theme shrinks small images by 60% when plenty of space

Board footer

Powered by FluxBB

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