laravel - How to display Protected Images in Email Messages -


i creating web app using laravel 5.3 authorised users can view images in app. example, lets says facebook friends can view user's avatar if permission set that. when image viewed app, api check auth credentials, check permission , displays user image accordingly. however, question is, if sending notification emails users, how can display protected images in email messages? example, if add img url in html email:

<img src="http://example.com/api/image/useravatarname.jpg" /> 

the above fail since doesnt have token in it. in these cases, how protected emails displayed in emails? how website facebook it?

these methods have thought of not happy with:

1) embed image binary data: don't know if adding image binary data work in html emails. if does, doesn't seem method when sending emails.

2) image url parameter: thinking maybe add parameters user's email address ?xyz@gmail.com img source url , api locate user email id , verify if have permission view image. problem is, people can view image adding email id parameter guessing.

3) facebook notification email: when checked facebook notification email, see avatars in email displayed , have no idea doing here:

https://ci5.googleusercontent.com/proxy/lkjasdlkjsaldjalsjdlasjdlkjasdljsaldjasldlasdljqljaldjsaldjsaldlsajdlsajdlkasjdkljasldkjaslkdjsakldjsaljdlsajdlasjdla#https://scontent-syd2-1.xx.fbcdn.net/v/t1.0-1/p100x100/ljsdlkjsdljsdljsd_23232323_23232_n.jpg?oh=askaslkalsjalsjalksjalkjsas&oe=58c270eee 

is there way?


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -