DEV Community

Discussion on: This Image Is Also a Valid Javascript File

Collapse
 
etienneburdet profile image
Etienne Burdet • Edited

Well I don't know precisely, but I was thinking something around a giphy copy-paste style: either with iframe, or little bit of JS script that seems to load a valid image. Like "copy this <script> … </script> at the bottom of your page and insert your .gif URL", which seems to be perfectly valid .gif if you open in browser.

Or a service like cloudinary could do that: inject script in your images and then execute it inside their SDK (while the url still gives a perfectly valid image).
That seems over complicated though…giphy just juste plain iframe without hiding anything and nobody cares 😅