Open hasarindaKI opened 6 months ago
@hasarindaKI for admin tables, I don't think that we should be doing resize operations on the fly. This could be an extremely resource-heavy interaction and provides very limited value to admins.
I think this type of flow would be more appropriate:
Yes, agreed that we shouldn't be generating previews on the fly.
Instead of representable
, we could use variable
& show the image.
Note: variable
is a include check in a configurable list of content types.
representable?
we render the attachment as an image tagrepresentable?
can be true for the following types if their related tools are installed on the systempoppler
installed ->PopplerPDFPreviewer
ormuPDF
installed ->MuPDFPreviewer
ffmpeg
installed ->VideoPreviewer
poppler
ormuPDF
is installed(Or even for video), we need to create theimage_tag
as given below..For more details => https://api.rubyonrails.org/v7.0.8/classes/ActiveStorage/Preview.html & https://api.rubyonrails.org/v7.0.8/classes/ActiveStorage/Blob/Representable.html
Proposed change
Example using Hunter & Co. app