简体   繁体   中英

Rails 3 - How to embed inline Images that are hosted on S3

in my Rails 3 app, I send out emails that include user profile pictures. Problem is GMAIL always shows the "Click to allow Images to Display" type of warning.

How can I embed the images inside the email so there are no external URL calls to get the images? Also, the images are on S3 thanks to paperclip and not stored locally.

Thanks

Unfortunately you can't force an email client to accept any kind of picture, whether it's embedded or an external URL. What you can do is include your pictures as attachments to the email instead of simply embedding them. That said, different email clients handle attachments in different ways, but GMAIL for example will scan the attachments and then display them below the message. If you want to have your images actually embeded with the text you'll have to settle for the 'Click to allow Images to Display', since it's there for security reasons and is out of your control.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM