Skip to main content


For me it is crucial that the dimensions are kept the way they are.

Concerning pictures without dimensions: I'm currently unsure if this is a only theoretical or really existing issue.

So then you don't care for the "Literal Grid" layout that crops them?

And in case it isn't clear, in the "masonry" layout with 3 images the dimensions of the third image aren't being changed, only the scale, to match the width and span the columns above it.

I don't like the cropping of pictures. But for me it's fine to change the size (while preserving the ratio) to improve the look.

@Random Penguin

So then you don't care for the "Literal Grid" layout that crops them?


I don't like that either; information gets lost because you can't tell that the images are being cut off. I'm in favor of always displaying images in their correct aspect ratio, and at most using CSS to adjust the layout.
@Michael 🇺🇦

@Random Penguin The three-image masonry layout should indeed display like the second version. This was the intention and I’m not sure why it doesn’t do that currently.

I’m also personally against the literal grid layout because it requires to open images to see them in their original format, which for a reason that will forever escape me, doesn’t work in iOS Add to Home Screen context, where both the Javascript AND the native click events are being fired, resulting in the image opening in the same virtual browser without any navigation controls, which forces me to exit the “app” and open it again.

Friendica Support reshared this.

Sounds a lot like what I've run into with legacy code that used JS to make the UI work on touch interfaces but when it's run in modern browsers that do a good job on their own of mapping touch input to desktop events, it causes it to fire both events.

@Random Penguin I’d be inclined to agree with you, but it only does this in this particular environment. Not in any mobile browsers I’ve tested, not in any desktop browser I’ve tested. To make matters worse, the Add to Home Screen feature caches dependencies heavily, so any changes in the code requires to delete the virtual app, clear the cache somehow by waiting an indeterminate amount of time, and adding the app again. At some point I threw the towel and I don’t touch images in my feed.

To note: it also fails with the New Post button but this leads to the Composer page (instead of just opening the jot) which has navigation, so it isn’t debilitating.

The masonry layout doesn't display like the second version because of this conditional at the top of the layout function:

if ($singleImageInRow = count($PostMediaImages) == 1) {
     $PostMediaImages[] = $PostMediaImages[0];
}

The array of images is run through both array_map and a "chunk" operation to split it into pairs. If the length of the chunk is "1" it duplicates the one image and lower down in the code gets the dimensions as if there were a duplicate of that image next to it. But the total count for display is still the original count of images so it never actually displays that image twice at the end.

Comment out/remove that conditional and the last image is scaled to span the columns above it.

@Random Penguin Thanks for looking into it, now I remember that if the third image is in portrait then the gallery suddenly takes too much vertical space. This was a cop-out to avoid the vertical image issue. With a horizontal image it’s fine to have it take the whole column.
There's no such thing as taking up too much vertical space on a page that can, in theory, be infinitely long. Sure, some people may not like scrolling a wee little bit more because of a portrait image. I'd rather have the layout look right than accommodate their impatience. Doom Scrolling *should* take a little extra effort. 😈
@Random Penguin
It is essential that the aspect ratio in the preview is maintained. Cropping the images in the preview should not be the aim.
@Random Penguin
These examples clearly illustrate the effect that cropping the images has on the view.
It becomes unusable:
Friendica Friendica
Mastodon Mastodon

Okay everyone I get it. DON'T CROP IMAGES. The "Literal Grid" is out. Not doing it.

This is why I ASKED first. 😉