Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image resizing is not CSP compatible #1792

Open
stgogm opened this issue Dec 9, 2016 · 1 comment
Open

Image resizing is not CSP compatible #1792

stgogm opened this issue Dec 9, 2016 · 1 comment

Comments

@stgogm
Copy link

stgogm commented Dec 9, 2016

When resizing an image with a CSP active, the resized image results in stretched and/or malformed images. This is caused by the following line in resize.js:

imageElement.setAttribute('style', 'visibility:hidden;position:fixed;z-index:-100000');

This could be solved by allowing a CSP option, maybe ngf-csp="true", to add a class to the element instead of setting the style programmatically.

@stgogm
Copy link
Author

stgogm commented May 10, 2017

I've created a pull request with a working solution in #1921.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants