Users in our platform can have a user picture, but if the choose not to, we just use a unique avatar picture for each user.

We get that picture using an external API, by accessing it just with a URL

https://avatars.dicebear.com/v2/identicon/ + userIdentifierorname + .svg

It works great in our website, but when we try to send emails with news on our community we need to display these Avatar for the users that don't have any profile picture, but using images as external and with this URL doesn't work and they are not being sent with the emails.


I just want to know if this is a known issue, if external images to the server cant be included on email.

Bruno,

I believe you could try something very simple: Save this generic external avatar as the real user image instead of using it directly, just like if the user had uploaded it. Convert it to png first.

As I've tried in other moments, images in e-mail are converted to something like this in e-mails:

<img src="data:image/jpeg;base64,/9j/4RiDRXhpZgAATU0AKgA..." />

At that time i was trying to use the external image feature to try to track e-mail reading, but this conversion happened all the time. There could have some issue to convert svg to this format at OutSystems email sending.

Have you tried other file formats such as jpeg or png rather than svg?

Understand that not all mail clients support it very well. 

https://css-tricks.com/a-guide-on-svg-support-in-email/




Renato Nascimento wrote:

Bruno,

I believe you could try something very simple: Save this generic external avatar as the real user image instead of using it directly, just like if the user had uploaded it. Convert it to png first.

As I've tried in other moments, images in e-mail are converted to something like this in e-mails:

<img src="data:image/jpeg;base64,/9j/4RiDRXhpZgAATU0AKgA..." />

At that time i was trying to use the external image feature to try to track e-mail reading, but this conversion happened all the time. There could have some issue to convert svg to this format at OutSystems email sending.


Yes, After much thought I guess its just easier to have them in the databse. Now I just need to figure it out how to convert SVG to JPEG or PNG, since the API we are using to get avatars send the images in SVG format.