Good day all. I'm currently working on a new add-on that supports attachments and have an issue with images. Attachments that are not images display properly and are downloadable, however, images display just as View attachment xxx links (no thumbnails, and they open in a new window when clicked).
The image attachment data is stored in xf_attachment_data with the file hash, and the content type is set correctly in the xf_attachment table. When I look at the saved messages in my add-ons table, images are saved in the correct format as expected, but for some reason when viewing them they do not get processed, and display as links mentioned above.
If I set this function in my entity
Thanks for any assistance,
Lawrence
The image attachment data is stored in xf_attachment_data with the file hash, and the content type is set correctly in the xf_attachment table. When I look at the saved messages in my add-ons table, images are saved in the correct format as expected, but for some reason when viewing them they do not get processed, and display as links mentioned above.
If I set this function in my entity
isAttachmentEmbedded
to always return false, the images are displayed as thumbnails, and when clicked opens the lightbox (though the image links are still displayed above them), so I know all the image data is there. The question is, what am I overlooking to get {{ bb_code($myArray.message, 'mycontent_type', $myArray) }}
to render images correctly? This is driving me mad, and I figure it is something simple I'm overlooking.Thanks for any assistance,
Lawrence
Last edited: