Skip to content

Link attachment picture extra space #691

@f3dm76

Description

@f3dm76

What did you do?

I have a message with a link, here is what I see:
Simulator Screenshot - iPhone 16 Pro Max - 2024-12-17 at 15 17 13
The space on top/bottom of the image looks bad, I looked into the code and here is what I see in LinkAttachmentView

LazyImage(imageURL: linkAttachment.previewURL ?? linkAttachment.originalURL)
    .onDisappear(.cancel)
    .processors([ImageProcessors.Resize(width: width)])
    .priority(.high)
    .frame(width: width - 2 * padding, height: (width - 2 * padding) / 2)
    .cornerRadius(14)

height: (width - 2 * padding) / 2 - is a copy-paste bug I think. maybe not, but in any case, this is the line that causes the problem, could you please look into that? also the text is getting cut off, not sure if that's intentional...

Here is the test message text:

This weekend I'm actually leading a beautiful free wellness event at the CX Collective in Soho on Sunday December 15th in the last full moon of the year. The founders of CX Collective actually also founded Daybreaker and are building an incredible space in Soho! It would be amazing if you could make it! It'll include a warming beverage to enjoy when you arrive, a few lovely connective exercises rooted in Tibetan Buddhist Tradition, light movement and breathwork meant to break up chakra blockages and a meditation focused on sending compassion to all beings before the new year. It's an invitation to "soften and reclaim our humanity" through a few practices rooted in culture and tradition. All you need to wear is anything comfy and all you need to bring is yourself. Date & Time: Sunday, December 15th at 3pm Location: CX Collective in Soho RSVP: https://hello.cx/rsvp/honeyingthesoul

What did you expect to happen?

simulator_screenshot_FCE9CFD5-9F0D-4F33-B44D-5AFEB0669BAC

GetStream Environment

GetStream Chat version: 4.68.0
GetStream Chat frameworks: StreamChat, StreamChatUI
iOS version: 18.0
Swift version: 6.0
Xcode version: 16.0
Device: sim iPhone 16 pro max

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