Search code examples
fancybox

Adding custom width hieght if fancybox opened svg image


Im using fancybox popup for images. I want to check if a loaded image is svg then assign custome width height for overwirte actual size of a image.pls advice


Solution

  • Simply use this demo https://codepen.io/fancyapps/pen/rYQogO?editors=1010 (from the docs) as an example. This is how you can check current source - current.src