Skip to content

Add support for multi-images #2

Description

@Someguy123

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

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions