ionic-image-loader
ionic-image-loader copied to clipboard
[Bug] Unable to load SVG image
Hi I am trying to load SVG image but it always shows a blank square, is it becuase it does not support SVG?
I haven't tried SVGs... this can be caused by the file extension. This module saves images in the local storage without extensions, and this causes the browser to load it as a normal image.
If you use the base64 option for these images, it might work. I will update the module and include file extensions in the local storage.
Ah yes, I have the same issue ;) Remote png works fine but when I switched to SVG it does not work:
https://forum.ionicframework.com/t/svg-images-served-from-remote-serve-not-rendering-in-android-native-build/111607
I'll do a workaround and keep an eye on this, thanks
I'm having the same issue. I hope the module supports SVGs asap. Also, cannot upgrade from 4.2.1 to the latest version due to #131 bug.
Also experiencing the same problem... did anyone find a workaround for this? (other than changing to a JPEG/PNG?)
imageLoaderConfig.setFileNameCachedWithExtension(true); solved my issue that svg files cannot be loaded. Set it to true will keep the file extension and it works fine for me.
@jacywang imageLoaderConfig.setFileNameCachedWithExtension(true); is helpful to solve the svg issue for extension. but, the images are not rendered.upon inspecting the src has the value as local file url .can anyone mention a solution for this.
File url:
file:///data/user/0/
/cache/image-loader-cache/1510130930.svg