elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.31k stars 544 forks source link

Allow specifying the focal point on uploaded images #2367

Open flaki opened 11 months ago

flaki commented 11 months ago

This is a parity feature, when the focal point is specified on the image during upload clients can use that information when showing cropped previews to better align the image. It is currently not possible in Elk to attach this information to uploaded images.

stackblitz[bot] commented 11 months ago

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

ayoayco commented 6 months ago

Hi @flaki can you give an example post that needs this? I think elk has less need for it because it looks like we don't crop image posts as much compared to mastodon web app. 🤔

flaki commented 6 months ago

Hi, I think this is a good example.

Without specifying the focus pont the crop would ruin the image in the feed: smolbig-wrong

With the focus point set, the image is correctly previewed in the feed: smolbig

Please note that due to the nature of the fediverse, it does not particularly matter how Elk crops images in the feed, as posts made using Elk may be displayed in any other server/client, using completely different defaults, but as long as the focal point is set on the post (and the given client respects it) the images will show up correctly.