Hello/Hi/Greetings,
I have the plugin installed "Download by Size" where it has "applied" for 2 out of 4 albums.
Im able to download in different formats from 2/4 albums but the two others it just download the raw photo format
Enviroment:
Piwigo 2.10.2 Check for upgrade
Operating system: Linux
PHP: 7.3.19-1~deb10u1 (Show info) [2021-02-03 12:57:39]
MySQL: 5.5.5-10.3.25-MariaDB-0+deb10u1 [2021-02-03 12:57:39]
Graphics Library: External ImageMagick 6.9.10-23
Last edited by Jyskip (2021-02-03 13:08:54)
Offline
Seems to have isolated the issue to be file specific.
Only files that are ".tif" cannot be converted for the purpose of using the "Download by Size" function..
Offline
Hello !
I have always been taught that .tif files are not fit for the web and that they should be converted to .jpg beforehand.
Offline
I doubt it's a general tiff vs jpeg problem, but rather that the plugin treats tiff special under some condition, see $permitted_non_picture in
https://github.com/plegall/Piwigo-downl … nc.php#L23
and following. Maybe the condition isn't as intended, though from a short glance it looks like a tiff is excluded from the early return.
Another possibility would be that for some reason $picture['current']['download_url'] is empty as if "the user has not access to the original" picture and
$conf['download_by_size_follow_enabled_high'] = true;
is set in the config.
Offline
Hello,
I don't see the paramters "$permitted_non_picture" in the main.inc.php
for Download By Size.
Can i just add it to the code?
Offline
Apparently the code that can be downloaded as [extension by plg] Download by Size is not the same as the GitHub one linked to on that extension page and does not include the latest commit (now one year old) that exactly made this change:
[Github] Piwigo-download_by_size commit 70b8aa46
You can try to apply the patch (of course you backup the plugin first :p) in your installation, i.e.
cd plugins/download_by_size curl https://github.com/plegall/Piwigo-download_by_size/commit/70b8aa4655561da9a336ca77ef949452917d18d4.patch | patch -p1
Offline
Hello,
I have runned the patch you mentioned on the Download_by_Size.
I can see from my config file that there are no
$conf['download_by_size_follow_enabled_high'] = true;
But i will try make it pregenerate some new pictures (if i can do it manually?)
Offline
$conf['download_by_size_follow_enabled_high'] is unrelated to the patch, it has been there before and when set to true forbids to download any size if the user is not allowed to download the original size.
Offline
When i read about the "download_by_size" its not telling me how and when it will generate other formats from the orginal .tif file i will upload.
Can i force it to generate more files with the batch manager "generate multiple size images"?
Offline
When a .tif file is uploaded to the site / is allready there - how do i trigger download_by_size to convert it into multiple files for download?
I can do a batch manager where i can generate multiple sizes, but doesn't seems to work that way..
Offline
I don't understand. What is the problem if the derivative to be downloaded is generated when it's actually needed? Note I don't even use that plugin..
Offline
Hello,
My problem is currently, that after making all this changes - and checking the exclusion list, it still cannot generate any other formats from the .tif files.
This is still the problem i am having. :-)
Code from main.inc.php
function dlsize_picture()
{
global $conf, $template, $picture;
// some non picture files (with a representative) are relevant for multiple
// size download, so let's make exceptions
$permitted_non_picture = array('tiff');
and from the config.inc.php file
<?php
$conf['tiff_representative_ext'] = 'png';
$conf['graphics_library'] = 'ext_imagick';
$conf['raw_jpg_quality'] = '60';
$conf['tiff_jpg_quality'] = '60';
$conf['browser_language'] = false;
$conf['guest_access'] = false;
$conf['random_index_redirect'] = array(
PHPWG_ROOT_PATH.'index.php?/categories/20' => 'return true;'
);
$conf['enable_i_log'] = true;
?>
Maybe its the ext_imagick that is not working as it should?
Offline
Jyskip wrote:
My problem is currently, that after making all this changes - and checking the exclusion list, it still cannot generate any other formats from the .tif files.
This is still the problem i am having. :-)
Code from main.inc.phpCode:
$permitted_non_picture = array('tiff');
You modified the original code that listed tif and tiff to not have tif anymore.. [Github] Piwigo-download_by_size commit 70b8aa46 has
$permitted_non_picture = array('tif', 'tiff');
Offline
Hello,
I have made the code the original again.
I can see that .png, .jpg etc are making different sizes to download and having them in the pwg_representative
But currently im trying to make it do the same for .tif files - but cannot see how i can make that work, and troubleshooting this is not exactly easy.. :)
Offline
Dumb question: did you apply the entire patch or just added the 3 lines you quoted?
Offline