Skip to content

Zoom into original image when using srcset in Fancybox #380

Description

@mikaraunio

When using data-srcset, zooming zooms into the currently selected source of the srcset. If the source sizes are judiciously selected, the image is already appropriately sized for the viewport, so very little zooming actually happens. Or, if data-width and data-height were specified, the image is indeed zoomed to those dimensions, but the source is not switched, which can cause upscaling.

Is there a way to always use the original (href / data-src) image for zooming instead? I understand this can cause a delay as the image may need to be loaded when the zoom action is triggered (and prefetching the original would defeat the point of using srcset).

Observed with latest Fancybox on MacOS Chrome 107.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions