autoResize: false Functionality v3
Hi, coming from Fancybox v2 we used autoResize : false and would need the exact same option for v3 but unfortunately haven't found a working solution.
The images shall not be enlarged. At least not on the desktop. (for mobile we are fine with the standard behavior of enlarging images) Scaling images down if they are larger than the viewport is fine.
We experimented with CSS
.fancybox-image { max-width:50%; max-height:auto; }
But this does not work, since: the image is twice the size (shall be displayed at 50% for retina screens) and width/height is not defined in the image tag.
Hi,
If you are looking for disabling zoom on click, then use clickContent option, default value is:
clickContent : function( current, event ) {
return current.type === 'image' ? 'zoom' : false;
}
Hi, it's not about zoom on click. It's about the feature of Fancybox 2: autoResize : false The pictures shall be displayed at their ACTUAL size. But the standard behavior of Fancybox 3 is to enlarge them if the the browser window dimensions are larger.
Sorry, I do not get you. The whole point of fancyBox is to display larger image.
Also, autoResize option was used to enable/disable content resizing after window resize event.
please excuse the confusion. the website has thumbnails and a fancybox group. a click on the thumbnails opens fancybox and shows the picture almost full size in the browser window. it also scales up and down the image when resizing the window. we would like to click the thumbnail and a larger representation of it opens in fancybox BUT fancybox should rather display that image at its actual size (or half the size for retina displays). it shall not scale up when resizing the window or when opening fancybox.
the settings we are referring to were probably fittoview and pixel ratio in version 2.
So, you want to disable resizing completely and display image in actual size? Sorry, there is no option for that, yet. There is already a feature-request for that and it is planned to implement that after fixing some issues.
Yes, either disabling resizing completely OR maybe only upscaling (downsizing might be still useful if the window is smaller then the image's actual size). We are really looking forward to this feature!!! Otherwise, version 3 is truly amazing. Good job!!!