Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Albums: Set cover image for album/calendar/folder/moment/state/person #383

Open
jimmcslim opened this issue Jul 7, 2020 · 56 comments
Open
Labels
idea Feedback wanted / feature request

Comments

@jimmcslim
Copy link

It looks like (apart from Stacks which have a 'primary' photo) it isn't possible to set the hero image for a collection of photos (e.g. Album, Calendar month 'Album', Moment, Folder).

Some ideas:

  • Support the 'primary' concept that is used with Stacks.
  • Use favourites? If multiple favourites, then either cycle through them (animated? or pick one at random when the collection is loaded for a particular view), or maybe render a 2x2, 3x3, 4x4 (or beyond?) mosaic.
@lastzero
Copy link
Member

lastzero commented Jul 7, 2020

We automatically use the most recent one with the highest relevance right now (favorite, most recent, good resolution, complete metadata). We can later add a dialog to manually set a specific image, but we also need a fallback if that photo was removed / deleted.

@lastzero lastzero added the idea Feedback wanted / feature request label Jul 7, 2020
@jimmcslim
Copy link
Author

I think I tried setting a favourite and it didn't appear to update immediately, but maybe there is a delay or the other photo was still ranked higher somehow?

@lastzero
Copy link
Member

lastzero commented Jul 8, 2020

Yes, we cache the photo as the query is quite expensive. An improvement would be to detect changes and clear the cache so that they become visible immediately.

@graciousgrey graciousgrey changed the title How to set the hero image for a collection Possibility to choose the cover of an album/moment/folder among its photos Nov 23, 2020
@graciousgrey graciousgrey changed the title Possibility to choose the cover of an album/moment/folder among its photos Albums / Set cover image for album/calendar/folder/moment Nov 26, 2020
@graciousgrey graciousgrey changed the title Albums / Set cover image for album/calendar/folder/moment Albums: Set cover image for album/calendar/folder/moment Jan 5, 2021
lastzero added a commit that referenced this issue Oct 1, 2021
lastzero added a commit that referenced this issue Oct 5, 2021
@graciousgrey graciousgrey changed the title Albums: Set cover image for album/calendar/folder/moment Albums: Set cover image for album/calendar/folder/moment/state/person Oct 15, 2021
@lastzero lastzero removed the unfunded label Nov 1, 2021
@0xsShady
Copy link

0xsShady commented Feb 3, 2022

Hi!

is still not possible to choose a specific photo to set up the thumbnail for an album?

@graciousgrey
Copy link
Member

@AbucoAnd No, that's why the issue is still open ;)
You can do it directly in the database until this is implemented.

There are tons of feature requests, can't do everything at the same time. You can support us by becoming a sponsor.

@0xsShady
Copy link

0xsShady commented Feb 3, 2022

@AbucoAnd No, that's why the issue is still open ;) You can do it directly in the database until this is implemented.

There are tons of feature requests, can't do everything at the same time. You can support us by becoming a sponsor.

thanks for the quick reply @graciousgrey ! much appreciated!

As soon as I decide if I finally use Photoprism, I will make a donation to support you ^^

Also I would like to know if is there any way to "customize" the app or it's not legal?

@graciousgrey
Copy link
Member

@AbucoAnd You can choose between several themes already (https://docs.photoprism.app/user-guide/settings/general/). In addition you can customize the app by editing the environment variables (https://docs.photoprism.app/getting-started/config-options/#web-app)

@pabsi
Copy link

pabsi commented Feb 18, 2022

You can do it directly in the database until this is implemented.

Hey @graciousgrey , what would be the table and query to update such information? I'd happily do so in the meantime.

The work you people are doing with this software is amazing. I am extremely happy for it. My family gallery is now all organised and with face recognition, and the places section is just so good too!

Love you all 🤗

@graciousgrey
Copy link
Member

Thanks a lot for your feedback :)

To update the cover image in the database:

  1. Copy the filehash of the photo you want to have as cover. You find the hash on the Files tab of the edit dialog (https://docs.photoprism.app/user-guide/organize/edit/#edit-files)
  2. In the albums table set the filehash as "thumb"
  3. Set "thumb_src" to "manual" so that your changes do not get overwritten

@pabsi
Copy link

pabsi commented Feb 20, 2022

Thanks a lot for your feedback :)

To update the cover image in the database:

  1. Copy the filehash of the photo you want to have as cover. You find the hash on the Files tab of the edit dialog (https://docs.photoprism.app/user-guide/organize/edit/#edit-files)
  2. In the albums table set the filehash as "thumb"
  3. Set "thumb_src" to "manual" so that your changes do not get overwritten

Appreciate the pointer!

I wanted to update a face "album" instead, which was a bit more fiddly, but ended up working for me:

  1. Find the image containing the face you want to set up as thumb of the face set/album
  2. Go to Edi > People. Right click the face > Inspect (with developer tools). You'll find something like <HASH_OF_PHOTO>-<Another_hash>. e.g. 097027a42ff0dc20c7fbd0dd1de24764648cb7f9-0c50d8249249
  3. In the database, update the subjects table as you suggested above (instead of the albums table.

The only unknown thing to me is the extra little hash after the photo hash, which identifies the specific person you are after amongst the many people's faces.

Perhaps you can clarify a bit more for me here (also, if there is any way to find such hash, instead of using developer tools)

Thank you again!! 🙏

@graciousgrey
Copy link
Member

For normal album the whole image is used as cover.

For subjects only a cropped portion of the photo is used. This crop has a different hash.
This hash is not listed within the photo details. Using the developer tools is the easiest way to find the hash of the cropped face :)

@jamesingham
Copy link

jamesingham commented Apr 18, 2023

No worries, I was just curious if it was ever addressed.

Unfortunatley for me, it seems to occasionally reset the album thumb (to the most recent image hash) as I use Photo Prism.

@diedrichg
Copy link

You can't get new users if you don't add basic features. You can't add basic features unless you gain new users. They both come hand-in-hand, a 3-year old basic function should have been addressed by now.

@Rolf-Smit
Copy link

You can't get new users if you don't add basic features. You can't add basic features unless you gain new users. They both come hand-in-hand, a 3-year old basic function should have been addressed by now.

As much as I would love to see this feature being implemented. It is unfair to talk to the maintainers and creators of this project in the way you are doing. "Should have been addressed", maybe if this was contractually set in stone, but that ain't the case. This is an open source project and we should be glad it exists and we can use it for free.

@diedrichg
Copy link

It is unfair to talk to the maintainers and creators of this project in the way you are doing.

I enjoy PhotoPrism very much and my rudeness was unwarranted. I apologize for my tone and comments. I only want to see this software progress and to reach its full potential. I will keep my emotions in check.

@DmitryNefedov
Copy link

Is there still a way to set a "People" cover photo? Ive tried extact hash from DOM but after DB update it just shows emty cover.

style="background-image: url("http://photoprism.lan:2342/api/v1/t/hashA-hashB/1c3n4otv/tile_320"); background-position: center center;

Ive tried both hashA, hasAhashB, as a thumb in subjects table with no luck.
Im using adminer to get to DB

@graciousgrey
Copy link
Member

In the subjects table, you need to set "thumb" to "hashA-hashB" and "thumb_src" to "manual". After you submit your changes, the cover will be updated.

Next time you need help or if there are further question, please post your question in GitHub Discussions or ask in our Community Chat.

Thank you very much!

@DmitryNefedov
Copy link

Thanks for the reply. Last message here.
The issue was adminer, you need to expose the port and connect with a proper tool.
Works fine.

@Xirt
Copy link

Xirt commented Sep 14, 2023

For information: I have been playing around with this in a dev box recently and now I am able to set the album covers via the "Edit Album"-form. However, I would like to beautify my solution a bit to make it more user friendly / sturdy prior to considering creation of a pull request. Let me try to find some time for this in the coming period.

Furthermore, I assume the solution can be copy / pasted to other entities but I have not looked into this yet as for me setting thumbnails for albums is the main missing feature (as usually I share albums with interested people, not other entities).

@Xirt
Copy link

Xirt commented Sep 15, 2023

I spend a bit more time to make thumbnail selection easier by actually showing the thumbnail itself in a dropdown field (using tile_50). The code is working in major browsers, but might benefit from some (relatively simple) refactoring by the team on merge as I assume they have significantly more knowledge on the Vuetify framework :).

Screenshot 2023-09-16 004453

Let me see if I can wrap things up for the selection for Albums and create a clean pull request in the coming period.

@lastzero
Copy link
Member

That looks great! Of course, we still need to test it and can't merge it until it's (almost) ready for production. Note that some users have very large albums with thousands of pictures - so those shouldn't break the UI.

@kevincox
Copy link

I would love to see that interface but I wonder if it would be better to use the regular photo selection to do this.

  1. We know it scales to large albums.
  2. It allows sorting and the different view modes.
  3. Makes it easier to browse through photos and find the correct one.

I think the main downside is that it is a little multi-select focused. But I think that it would be fine to have this option appear only if one photo is selected.

@Xirt
Copy link

Xirt commented Sep 16, 2023

I was a bit worried that adding another icon could be confusing (the first time I opened PhotoPrism I needed to 'figure out' what some of the icons are used for). But let me explore the option a bit as I also do see the benefits you mention.

@kevincox
Copy link

Yeah. That's a good point, there are already too many icons there if you ask me.

But I think that is a problem that needs to be solved anyways. There is going to be a need for more actions. Maybe an overflow menu or some other interface would help. However it seems to me that adding another action list is the right approach. If that means that the action list can then be improved it may theb make sense to do that.

But I'm not actually in charge here so 🤷

@graciousgrey
Copy link
Member

graciousgrey commented Sep 16, 2023

As you both say, adding more options to the existing context menu is not an ideal solution and we prefer not to do that, also because there is not enough space on smaller mobile devices. There is definitely a need for more actions and we have already thought about adding an additional menu (maybe in the toolbar), we just haven't had time to experiment with it yet.

@kevincox
Copy link

I guess my point is that using a worse UX to work around a problem that is going to be fixed anyways seems suboptimal. But maybe if we want to get this feature shipped soon that is what we need to do.

@Xirt
Copy link

Xirt commented Sep 18, 2023

I do recon the point of @kevincox, but I think it is not up to me to redesign the context menu of the viewer as part of this feature implementation. The back end changes I made (and the logic used for the front end) can probably be reused should the solution be moved to this menu at a later moment in time.

With above in mind I did some quick tests on my implementation to check scaling: it appears lazy-loading of Vuetify is working properly. Having an album of approx. 70 images shows that half the thumbnails are loaded when opening the "Edit Album"-dialog, while the remainder is loaded when scrolling through the selection list (they are probably below the fold prior to scrolling). I will try to create a test set of approx. 1000 images to see how the GUI reacts to such an amount on both desktop and mobile. That should cover the majority of use cases and I hope the solution is still well responsive with this amount :).

Update: No issues with 800 images on a desktop. I will expand the set and check some other device / browser configurations.

@Xirt
Copy link

Xirt commented Sep 21, 2023

I created an album with 4975 pictures and tested functionality in Edge, Chrome and FireFox. They all work fine with a minor delay before populating the options in the field due to the full list being received from the server: for me the delay is acceptable as I believe most albums will probably be smaller (potentially in contrast to folders) and it's still short.

I will do some final clean-up / code tweaking before testing in above browsers and mobile formats. Once OK, I will look into the creation of a clean pull request.

Xirt added a commit to Xirt/photoprism that referenced this issue Sep 22, 2023
@Xirt
Copy link

Xirt commented Sep 22, 2023

I am creating a pull request for this feature (for Albums) as I have updated translations and did a last pending bugfix (Vuetify Select is not neatly working with long option labels; alternative to CSS implementation is to truncate the photo names in JS). The final implementation looks as follows:

Edit Album 1
Edit Album 2

As a performance security measure the selection box will load maximum 10.000 photos from an Album. Similar logic has been implemented in PhotoPrism earlier to maximize the amount of Albums that can be displayed (here). Obviously, this logic can be removed if considered more convenient.

@topa-LE
Copy link

topa-LE commented Oct 19, 2023

@Xirt
Use current Docker image. Is this album cover function integrated there? Because I unfortunately do not find this function in the edit of the album.

@mbsulliv
Copy link

mbsulliv commented Nov 1, 2023

It took me a while to find this issue because I was searching for "key photo" instead of "cover image" or "primary photo". This comment is just meant to add to the list of synonyms for this feature.

@andy47
Copy link

andy47 commented Dec 8, 2023

+1 for this feature, at the moment I can't share photos with my wife as the person folder for her picks the worst photo of her as the thumbnail. I've removed the photo from my library but it's still showing as the thumbnail.

@Techn1x
Copy link

Techn1x commented Dec 10, 2023

I think even just the ability to *veto* certain images from being used as a hero/album cover. This could be added as a toggle in the edit image.

I mostly just don't want to use certain bad images (but also don't want to ouright delete them - maybe it's just cropped badly on the square cover, or they're just not focused on the right thing)

This would probably be a lot eaiser to implement and satisfy the requirements until a broader "cover selection" feature could be rolled out

@lastzero
Copy link
Member

@Techn1x That seems doable... I've already thought about letting users manually change the quality rating, which is currently calculated automatically based on the picture type, size and metadata. This rating is also used, at least in part, to find the "best" available cover image. Note, though, that we're currently working on additional authentication and sharing options, so I probably won't get to it in the next few weeks.

@olterman
Copy link

olterman commented Apr 9, 2024

My issue is that it uses a photo marked private as the front cover picture of a person

@Thorwegian
Copy link

For me, the issue is that I'm quite drunk in the cover photo it picked... I tried archiving it, but it isn't working...

@graciousgrey
Copy link
Member

@olterman @Thorwegian Thank you for reporting! This should be fixed with #4238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Feedback wanted / feature request
Projects
Status: Ideas 💭
Development

Successfully merging a pull request may close this issue.