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

Add support for multi-images #2

Open
Someguy123 opened this issue Jul 18, 2023 · 2 comments
Open

Add support for multi-images #2

Someguy123 opened this issue Jul 18, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Someguy123
Copy link
Owner

Someguy123 commented Jul 18, 2023

At the moment, the service only supports displaying the first image/video in a post

The most likely best fix for this would be what VxTwitter does, which is to take all of the images in a post, and merge them into one single image in a grid:

4 image post:
+------+--------+
| IMG 1 | IMG 2 |
| IMG 3 | IMG 4 |
+------+--------+

2 image post:
+------+--------+
| IMG 1 | IMG 2 |
+------+--------+

3 image post:
+------+--------+
| IMG 1 | IMG 2 |
|     IMG 3     |
+------+--------+

This could be achieved using the Pillow library for Python, or another image handling library.

This would require that the embed images are actually served by the application instead of directly linking to them, which may require use of the privex-helpers cache system (via redis or memcached adapter in production) to speed up requests and avoid constantly rendering images unnecessarily.

NOTE: This shouldn't be done for videos, only images. For videos it's best that we continue to display just the first video, as it would be difficult to merge videos into one video, especially due to audio tracks. Videos should probably take priority over images, if a post contains a video, then we display just the video, or possibly we base it off of the first media, i.e. if the first media is an image, we display only the images, if the first media is a video, we display just the first video

@Someguy123 Someguy123 added the enhancement New feature or request label Jul 18, 2023
@Fauli1221
Copy link
Collaborator

Some Fediverse applications allow more than 4 images, so if #3 gets implemented this would need to be extended

@smiba
Copy link

smiba commented Jul 25, 2023

Some Fediverse applications allow more than 4 images, so if #3 gets implemented this would need to be extended

I think limiting it to 4 is fair though, as this seems to be the general limit on most platforms. I think combining more then 4 images to a single image will just not be practical, at that point you may as well open the whole post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants