With the changes you made to "message_as_html" for me, is it possible if the attached file is a JPG file to actually display the picture (or a thumbnail view of it) by inserting the link in an html img tag rather than just having a link to the JPG file?
It seems like it would be fairly easy to replace the existing attachments icon (the paperclip one that you just fixed for me) with the actual JPG image (since you have the link to the actual JPG). But rather than it being tiny like the paperclip one - specify bigger thumbnail size (like 200 pixels in height) and then follow it with the link like you have now - so people could click on the link to see the full size image.
So something like... (just replacing the image for the icon attachment with the JPG image itself & setting the height larger):
I like how it also shows the image online in the forum as well. Displayed in Outlook, it works great as long as only one picture is attached to the email. If there is more than one, then none of them have the thumbnail icon.
However even with one image attached, it doesn't seem to work properly with Gmail. If I compose an email in Gmail and attach a .jpg file, it uses the standard attachment icon instead. If I compose an email in Outlook and attach a .jpg file, it uses the picture as the icon as expected, but when that email is viewed in Gmail doesn't display. The box outlining the image initially comes up as the email is loading in Gmail, then the box disappears (the picture is never displayed). The thumbnail picture is part of the email, because when that same email gets delivered from Gmail to my Outlook, the picture is there & displays fine. Other images people include in the body of the email do display fine in my Gmail. So I don't know why these wouldn't.
The problem is if I'm not logged into my site, then the image doesn't display - because of the custom domain name / redirect to my forum.sudsol.org site (which is password protected). So, if I'm not logged in to my site, it looks like this:
Yet if I click on the "Download Attachment" link, it displays the image (without requiring me to login to my site first). So I don't know why the thumbnail image wouldn't work the same way… Thoughts?
Just did another test - it doesn't seem to matter if I'm logged into my SUDSOL site or not, the thumbnails are still showing as a broken link (as shown in the previous post) - for both images attached and sent via Gmail or via Outlook.
I've done some more testing and I *think* I've figured out when the emails show the thumbnails and when they don't.
The thumbnails show on categories where the View permissions are set to "Anyone". They don't seem to show the thumbnails where the View permission are set to something other than "Anyone" - even if the person getting the email is an administrator or authorized user of that section and able to view the items from that section.
I was not seeing the thumbnails for any of the posts to the Newsletter Coop section that I am using for testing. But I was getting the thumbnails in emails sent by other members to our Creative Idea Share section. The Newsletter Coop section permissions for viewing are set to only"Administrators" or those in the "Newsletter Coop" group. The Creative Idea Share section permissions for viewing are set to "Anyone".
I changed the View permissions of the Newsletter Coop section to "Anyone" and then sent an email with an attachment. The thumbnail showed up fine. I then changed the View permissions back to only admin/Newsletter Coop members and sent another email with an attachment. Again I could not see the thumbnail (even though I'm both an administrator as well as a member of the Newsletter Coop group). Instead I saw the broken link icon. If I click on the "Download Attachment" link, I'm able to see the image - regardless of whether I'm a member of the group or not.
I believe that the broken links come when your forum is private and the user is not logged in. We can't change that, it is a security feature related to email softwares.
What do think of alert in the email when the post contains an image? Actually, the broken link has been doing it already.
I thought that initially as well (that it was because it was behind a password protected area). But my testing showed that the images show fine for the sections that are visible to "Anyone", it's just the sections that have restricted visibility (not visible to "Anyone") - and it's not related to the password protection on my site, but actually related to being logged into Nabble or not.
Currently it's not a problem for me because I'm only using the section that isn't visible to all for testing. When I start using the section that is set up for only some to view, I'll just let them know that the thumbnails may or may not show for them - they can always click the attachment to see the image.
The ideal solution would be to display the thumbnail icon with each associated image. One thought I had for doing that was to search for the first attachment, replace the thumb_url for it and change the wording "Download Attachment" to "Download Picture" (so then you could repeat the search for the second Attachment and not have it pick up the first one again), replace the thumb_url & wording for it, then repeat until there are no more attachments.
The next best solution would be to do like it is now, find the first attachment, but then only replace the first thumb_url. So the remaining pictures would just show the default paperclip icon.
The last solution would be if there are more than one attachment to not replace any of the icons (I do NOT think my members want this solution - I'm currently gathering their input and so far they'd rather stick with the way it is now than have no pictures displayed).