Hi all,
Does anyone know of a simple way (or setting tweak) to set image #1 to be the default representative picture of the albums. Currently there only seems to be one default setting possible and that is random. Thanks!
Offline
The easiest way I've found is through viewing the image as an admin, then selecting EDIT then PROPERTIES PAGE
Once you select this, there is an option in the form for 'Album Thumbnail' where you can type in (with auto-completion) the album(s) you want to set this photo as representative for.
Offline
I'm looking for a way to change the DEFAULT behavior of the application from "random" to "image #1" when it assigns an image as representative of an album. I would like to automate this process if there's a way. Thanks!
Offline
Hi,
Which sort order do you use to calculate #1 image?
set one? current one?
title, filename, date_available, date_creation, rating, visited, size...
Offline
I would like picture with Rank 1 to be the one assigned by default as album representative instead of random.
Offline
Ok, I understand rank is from manual order.
I'm thinking about a SQL query to copy image ids from the table where manual order is stored. If we select only those with rank=1 we can update representative_picture_id field.
Exploratory query:
SELECT c.`name`, c.`representative_picture_id`, i.`image_id`, i.`rank` FROM `pwg_categories` AS c JOIN `pwg_image_category` AS i ON i.`category_id` = c.`id` WHERE i.`rank` = 1 ;
Offline
I wonder if I can give you a SQL query to copy first rank image id in representative_picture_id. This way sounds pourly explored, pourly tested, difficult? risky?
The nice way is to post in REQUEST forum https://piwigo.org/forum/viewforum.php?id=13
This new feature will involve at least appending code in most of the files using $conf['allow_random_representative'], and function get_random_image_in_category. That's a bit of work.
@jnashpiwigo answer is good as long you don't have so many albums. Looks like if you can set manual order, you could also pick the wished representative.
Offline