Link preview should not enlarge small images
Description:
When a user creates a message containing a link to an image, the app shows a preview of that image. The preview is resized in order for its width to match the width available for the message content. While this works fine for large images, (very) small images get enlarged by enormous factors.
Environment Information:
- Rocket.Chat Server Version: 6.5.3
- Rocket.Chat App Version: 4.45.0.55377
- Device Name: ELE-L29 (Huawei P30)
- OS Version: EMUI 12.0.0 (Android 11)
Steps to reproduce:
- Write a message containing a link to a very small image, e.g. https://rueckgr.at/~paulchen/avatar-small.png (24x24 px).
Expected behavior:
The image is not unnecessarily enlarged for the link preview. This is how it looks like in a desktop browser:
And in the mobile browser:
Actual behavior:
Hey @diegolmello, should I start working on this issue?
@paulchen can you provide more context? about this issue
@paulchen can you provide more context? about this issue
@JASIM0021 I don't know what information to provide besides what is already given above. If you have specific questions, feel free to ask.
@paulchen more information meaning is this problem occurring in both device ( android + ios ) or any device specific issue
let me confirm is this issue getting on both device or not
@paulchen i am working on it
@paulchen more information meaning is this problem occurring in both device ( android + ios ) or any device specific issue
@JASIM0021 I don't have access to an iOS device, therefore I am unable to answer this particular question.
However, I just verified that it still occurs on Android (Pixel 8, Android 14, build number AP2A.240705.005, app version 4.50.1.63100):
@paulchen this problem has been fixed on both devices please review pr:- https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/5789