32 points · by brbcoding · 12y ago · 8 comments
I'm curious to see the really specific case where this is needed. What actually will scan to make sure it's an image but then set it as a src on a script tag?
1. Hiding javascript one level more ( slightly harder to find what is going on than uglified JS )
2. Avoiding some script blocking scripts ( imagine ad-blocker that is not configured for such javascript option )
3. Saving traffic by putting javascript in the same request as an image resource that you are actually using.
https://developer.mozilla.org/en-US/docs/Web/Security/Same-o...