0

I need to generate a new image overlaying two remote images and then get the base64 encoding of the generated image.

Most of the solutions I found rely on the fact that those images should be located on the same server the website is:

Then looking at some source I found someone using the below base URL to overlay two images:

https://i.vimeocdn.com/filter/overlay?src=url-1&src=url-2

Example: https://i.vimeocdn.com/filter/overlay?src=http://www.backgroundsy.com/file/large/warm-colors-background.jpg&src=https://cdn3.iconfinder.com/data/icons/3d-printing-icon-set/256/Pause.png

It seems to involve some vimeo API. Is it a safe way to do this?

rafneb
  • 33
  • 2
  • 5
  • Using the Vimeo URL is not recommended; it's not a documented feature and is intended only for Vimeo's use. They may change or block it at any time without notice. – Tommy Penner May 14 '18 at 14:58

1 Answers1

0

I might have provided a tactic to solve this problem in an answer on a somewhat related post:

https://stackoverflow.com/a/52634041/2888452

However, I am explicitly uploading the two files rather than choosing external locations. I'm not certain how cross-domain protocols will handle images directly referenced from other domains. Maybe you can use the fiddler I created as a starting point & try referencing external assets?

Cheers!

David Walton
  • 221
  • 3
  • 3