Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to specify responsive images when initializing using markup? #853

Closed
luksak opened this issue May 31, 2015 · 2 comments
Closed

Comments

@luksak
Copy link

luksak commented May 31, 2015

Looking at the example markup on the getting started page makes me think that it is not possible to use responsive images when initialiting PS on markup:

<div class="my-gallery" itemscope itemtype="http://schema.org/ImageGallery">

    <figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
        <a href="large-image.jpg" itemprop="contentUrl" data-size="600x400">
            <img src="small-image.jpg" itemprop="thumbnail" alt="Image description" />
        </a>
        <figcaption itemprop="caption description">Image caption</figcaption>
    </figure>

    <figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
        <a href="large-image.jpg" itemprop="contentUrl" data-size="600x400">
            <img src="small-image.jpg" itemprop="thumbnail" alt="Image description" />
        </a>
        <figcaption itemprop="caption description">Image caption</figcaption>
    </figure>


</div>

Can we somehow provide different versions of an image? I guess it would have to work similar to srcset...

@dimsemenov
Copy link
Owner

Add another attributes to <a> that will contain URL and size of another image size, and parse them so slide object contains multiple image sizes like described here http://photoswipe.com/documentation/responsive-images.html

@dimsemenov
Copy link
Owner

closed by v5 #1749

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

No branches or pull requests

2 participants