[Feature] Fine grained settings for image_fit #451
Replies: 3 comments 7 replies
-
|
Any thoughts on this? Feedback is appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, Sorry for the delay. You can do this via custom css or you could use the splitview layout. The example below would change any portrait/square image (when using image_fit=cover) to image_fit=contain: /* portrait image with image_fit=cover */
.frame--image-fit-cover.frame--image--portrait {
object-fit: contain;
}As for off centring you could use /* portrait image with image_fit=cover */
.frame--image-fit-cover.frame--image--portrait {
object-fit: contain;
object-position: left bottom;
} |
Beta Was this translation helpful? Give feedback.
-
|
If you pull I haven't added them as class' as I feel they don't belong there. Instead I have added them as a data-*. This is the selector for targeting the tags /* portrait image with image_fit=cover and has the tag "demo" */
.frame--image-fit-cover.frame--image--portrait[data-tags~="demo"] {
object-fit: contain;
}The tags are sanitised, so all special chars (bar
You can see my unit test here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have searched the existing feature requests to make sure this is not a duplicate request.
The feature
Description
Thank you for this project it perfectly fits my needs since I moved to immich lately.
Since my photoframe application does not work anymore due to google's api change I found this awesome project.
It would be awesome to have some more flexibility for the image_fit settings.
My wish goes to
Use Case
If you have several portrait, square and landscape photos it might be handy to set different fill settings because the cameras aspect ratio does not fit 100% to landscape photos, so you set image_fit to cover. But then all portrait photos look awkward scaled in the frame. Same for square images. I suggest having square images separately configured because you can have portrait or landscape photo frames.
Details
For the custom settings I used the description field of my google photos to inject css via a json description like so to override the settings
{"photoFrame":{"size":"contain"}}to override
image_fit=coveror
{"photoFrame":{"vertical":"top"}}to fill but off center.
To have this ability would make this project a game changer for my photo frame.
For example these are the settings my app could parse:
{ "photoFrame": { "vertical": "bottom", "horizontal": "left", "size": "contain" } }Beta Was this translation helpful? Give feedback.
All reactions