feat: Add a placeholder for image attachments in conversations view (#8969)
We analyze an image to get it's height and width. On the frontend, we would show a placeholder with the corresponding width and height until the images are loaded properly. --------- Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
committed by
GitHub
parent
fd993feece
commit
b7a83dcbcd
@@ -76,7 +76,9 @@ class Attachment < ApplicationRecord
|
||||
extension: extension,
|
||||
data_url: file_url,
|
||||
thumb_url: thumb_url,
|
||||
file_size: file.byte_size
|
||||
file_size: file.byte_size,
|
||||
width: file.metadata[:width],
|
||||
height: file.metadata[:height]
|
||||
}
|
||||
|
||||
metadata[:data_url] = metadata[:thumb_url] = external_url if message.instagram_story_mention?
|
||||
|
||||
Reference in New Issue
Block a user