wittlock / ngx-image-zoom

Angular component for zoomable images
https://wittlock.github.io/ngx-image-zoom/
MIT License
133 stars 64 forks source link

Feature request: Allow SafeUrl as image source #129

Closed r0754497 closed 1 year ago

r0754497 commented 1 year ago

Currently the fullImage and thumbImage attributes only allow strings. SafeUrl works perfectly fine but just isn't allowed due to typing. My situation requires a header to be added to the request and a blob to be piped through the sanitizer, the string requirement forces me to either put up an unsafe endpoint or store base64 strings in memory. Neither of which is acceptable for my usecase. Made a pull request for it here: https://github.com/wittlock/ngx-image-zoom/pull/128/commits/b9fde0f931bc71e5d73be7ebd67f68073ef46c10

wittlock commented 1 year ago

Just pushed a 2.1.0 to npm with your pull request in it. Thank you for your contribution, I hope it works out for your needs!