Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    The technical challenge is to provide the image tiles for the plugin. Also see the documentation at https://github.com/dimsemenov/photoswipe-deep-zoom-plugin which shows how to provide the URL for the tiles at different zoom levels:

    data-pswp-tile-type="deepzoom" data-pswp-tile-url="path/to/tiles/{z}/{x}_{y}.jpeg"

    Where {z} is the zoom level, {x} and {y} are the tile numbers within the image.

    However, WordPress images are usually just single images and not a collection of tiles in multiple folders. Do you have a specific example how to provide the image tiles? And how should PhotoSwipe be integrated for this? As shortcode with parameters?

    Thread Starter andreacip

    (@andreacip)

    Hello, and thanks so much for your reply!

    I understand what you said about image tiles, and I know worpress usually have single images and I don’t want change this.
    I need only another 1 more click to zoom to simple have another “step” to zoom.
    Now:
    1) 1 click to open in lightbox
    2) Second click to zoom
    3) Is it possibile have another one click to zoom deeper?

    Really thanks!

    Plugin Author Arno Welzel

    (@awelzel)

    The point of the “deep zoom” plugin is not to allow enlarging smaller images when clicking them, but to support zooming using tiled images. And tiling makes sense, if you have very large images (for example 30000×20000 pixels big). However creating the tiles for different zoom levels needs additional tools (like https://github.com/nfabre/deepzoom.php or similar) and is out of scope for this plugin. That’s why I asked how you want to provide the URL pattern for the generated tiles.

    Edit: and even the example at https://dimsemenov.github.io/photoswipe-deep-zoom-plugin/ shows, that the non-tiled image can not be zoomed further. Only the tiled images can, because the provide the required image tiles for different zoom levels.

    Maybe there is a misunderstanding. What you ask for, already works exactly this way – without the “deep zoom” plugin. You can already click on a larger images to zoom in. However the image needs to be bigger than the current viewport.

    Example – see the image in the section “Mainboard and RAM” here – on most devices this image can be zoomed since it is bigger than the viewport when opening it in the lightbox. So when you first click it, it will fill the viewport, but you can click on the image, to zoom in further: https://arnowelzel.de/en/pc-with-amd-ryzen-7

    Only for SVG images you can define a custom maximum zoom factor in the settings, because these can be enlarged without any loss of quality. But for bitmap images like JPEG, PNG etc. it makes no sense to offer zooming in more than 100% since then only pixels will get bigger but you won’t see more details. On my website I have SVG images which zoom up to 200% of the original viewbox size.

    Example – see the “final schematic” image here: https://arnowelzel.de/en/alphaclock-old-meets-new

    And in general: if the image is already zoomed in or there is no zoom button visible in the lightbox, but you still want to enlarge it further, you can use the “zoom in” gesture of your browser (Control+Mousewheel or Cmd+Mousewheel and of course pinch to zoom on touch devices).

    • This reply was modified 1 week, 5 days ago by Arno Welzel.
    Thread Starter andreacip

    (@andreacip)

    Thanks again for your message!

    1) Thanks for your explanations, I don’t want add Deep Zoom plugin

    2) Yes, I think like you there is a misunderstanding. I can already click on a larger images to zoom in, but you say the image needs to be bigger than the current viewport.
    Thanks for your sample “Mainboard and RAM”, but in my sample I can’t zoom more until the maximum, I need to zoom to 100%:
    https://www.ciprianicomunicazione.com/archiviocapitolaredipistoia.it/museum/silent-gallery/

    I need to zoom to the 100% of the image size (without current viewport pagination maibe):
    https://www.ciprianicomunicazione.com/archiviocapitolaredipistoia.it/wp-content/gallery/pt_ac_d_53/0022vPT_AC_D_53.jpg

    3) Thanks again for your explanations, I know difference between bitmap and vector.

    Plugin Author Arno Welzel

    (@awelzel)

    About your sample at https://www.ciprianicomunicazione.com/archiviocapitolaredipistoia.it/museum/silent-gallery/:

    The referred image is 2932×4138 pixels. If you have a screen with less than 2932 px width (which is either 2932 pixels at 100% scaling or even more on a scaled display), then zooming in will show the image to fill a viewport horizontally – for example 1920px wide – and you can scroll up and down. This is the default behaviour of PhotoSwipe and makes sense in many cases. But for the same reason you can always manually zoom in further using [Ctrl]+[mousewheel up] or similar gestures.

    The zoom levels for the zoom icon can be adjusted according to Adjusting Zoom Level | PhotoSwipe – and one of the previous updates of my plugin included a change to adjust the zoom level because users complained that images are getting bigger than the viewport horizontally and they don’t want to scroll in two directions.

    I will include a setting for the zoom levels for PhotoSwipe 5 in a future update.

    Thread Starter andreacip

    (@andreacip)

    So I swaped to version 4 and it’s perfect!

    But also waiting with impazience the new update to setting the zoom! Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.