How can i get the full image size with Fancybox?
It is always resized to viewport. and for one of my project I don't need that.
I tried different options (fitToView, etc.) but i didn't succeed to get the full image size.
It seems that i'm not the only person with this issue: Using fancybox to view full sized image
Any help would be greatly appreciated!
The question might be duplicated but it may have a different answer. Actually the other question apart of being very old and it was never answered, is about how to customize a functionality not existing in fancybox v1.3.x (dynamically resize an image to its full size once is already opened in fancybox). Such functionality has been introduced with the "buttons
" helper in fancybox v2.x
On the other hand, if you just want to display images in their original size (not resized to fit in the view port) then: for fancybox v2.x use the API option fitToView: false
. For fancybox v1.3.x use "autoScale": false
$(".fancybox").fancybox({
// if fancybox 1.3.x
"autoScale": false
// if fancybox 2.x
fitToView: false
//
// don't use both
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With