Open anttix opened 7 years ago
This should not be the case, the sizes menu is generated from the built in sizes in exactly the same way as the default theme.
The only custom sizes are the thumbnails, which should only be generated once (the first time they are viewed)
On 25 Mar 2017 6:35 pm, "Antti Andreimann" notifications@github.com wrote:
Hi!
The theme uses custom sizes for everything. Even when XS or XXS etc are selected from the album thumbnail dropdown, Piwigo will still generate a custom size for the theme.
This is annoying to viewers because custom sizes can't be pre-processed from batch manager and the fist viewer will have to wait a significant amount of time until images are generated.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Philio/bootstrapdefault/issues/55, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOhGpeCeIcg9R-izXfYJb82jwm-aKYiks5rpV5fgaJpZM4MpKyq .
Well the behavior is broken at least with Piwigo 2.8.6
Steps to reproduce:
/_data/i/upload/2013/11/12/20131112002803-2f11102a-cu_e240.JPG
/admin.php?page=configuration§ion=sizes
Adding stars around define_derivative seems to fix the problem.
--- template/thumbnails.tpl.orig 2017-03-25 10:55:53.948173947 -0700
+++ template/thumbnails.tpl 2017-03-25 12:19:02.175315577 -0700
@@ -5,15 +5,17 @@
{if $derivative_params->type == "thumb"}
{assign var=width value=260}
{assign var=height value=180}
+{define_derivative name='derivative_params' width=$width height=$height crop=true}
{else}
{assign var=width value=$derivative_params->sizing->ideal_size[0]}
{assign var=height value=$derivative_params->sizing->ideal_size[1]}
+{*define_derivative name='derivative_params' width=$width height=$height crop=true*}
{/if}
-{define_derivative name='derivative_params' width=$width height=$height crop=true}
<style>
.placeholder-{$width} {
width: {$width}px;
- height: {$height}px;
+ min-height: 32px;
+ max-height: {$height}px;
background: url({$ROOT_URL}{$themeconf.icon_dir}/img_small.png) no-repeat center;
}
</style>
Hi!
The theme uses custom sizes for everything. Even when XS or XXS etc are selected from the album thumbnail dropdown, Piwigo will not use existing images but will instead generate a custom size for the theme.
This is annoying to viewers because custom sizes can't be pre-processed from batch manager and the first user has to wait a significant amount of time until images are generated.