Skip to content

Microblog: appended image links do not contain all images #2085

@safetycar

Description

@safetycar

Describe the bug
Some posts don't display all the images.

On which Mbin instance did you find the bug?
fedia.io

Which Mbin version was running on the instance?
1.9.1

To Reproduce

  • Look at this fedia.io entry which contains a imageset in fedia.io (screenshot below).
  • See that the expand links and the default image are both the same, and there is no other image visible.
  • Go to the original and see that it contains 2 different images (screenshot below).

Expected behavior
There should be a way to see both images but it is not always the case.

Screenshots
Fedia:
Image
Original:
Image

Desktop (please complete the following information):

  • Windows
  • Firefox
  • 149.0

Smartphone (please complete the following information):

Additional context
I have made some code searches in the repo without following them too deep.

But I'm very suspicious of this array_shift:
https://github.com/MbinOrg/mbin/blob/main/src/Service/ActivityPubManager.php#L960

Together with picking the tallest image:
https://github.com/MbinOrg/mbin/blob/main/src/Service/ActivityPubManager.php#L520-L524

If my suspicion is correct the first image was discarded because it was originally expected to be used as the main image but then stopped being the case because of the second.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions