You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Thanks for your great code, it's very nice.
I have a problem: when I click on an image (to see it on the lightbox), it creates an image with the dimensions indicated in "Site.php", in the "imageSizeBig" parameter. And so, this fills the cache folder.
I don't want to generate a new version of the image here, but just display the image stored in my source folder, whether it's really too small or really too big.
Is there a way to have this behaviour?
The text was updated successfully, but these errors were encountered:
In nova-themes/novagallery/album.php, around line 36, modify the code so that the image link itself does not have pass a $size argument:
<ahref="<?php echo Image::url($album, $element); ?>"><!-- <------------ here remove the Site::config('imageSizeBig') argument --><imgsrc="<?php echo Image::url($album, $element, Site::config('imageSizeThumb')); ?>" loading="lazy" class="rounded"><br></a>
Do the same in the nova-themes/novagallery/home.php file.
Then, in nova-base/lib/image.php, modify the lines around 83-89:
$url = IMAGES_URL.'/'.$album.'/'; <!-- Changed so that it does not point to cache -->
if($size){
$url = IMAGES_URL.'/'.$album.'/cache/'; <!-- Points to cache here -- it really only needs to do this for the thumbnails, or if the user actually wants to cache an imageSizeBig config -->
$url .= $size.'/';
}
I don't have a pull request out yet, because I think it can be handled better at the site config level. For instance, if imageSizeBig: 'original' is set (or something like that) , then the code can test against that and handle whether to add the 'cache' to the URL or not.
Hello,
Thanks for your great code, it's very nice.
I have a problem: when I click on an image (to see it on the lightbox), it creates an image with the dimensions indicated in "Site.php", in the "imageSizeBig" parameter. And so, this fills the cache folder.
I don't want to generate a new version of the image here, but just display the image stored in my source folder, whether it's really too small or really too big.
Is there a way to have this behaviour?
The text was updated successfully, but these errors were encountered: