Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6902083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:45:15+00:00 2026-05-27T07:45:15+00:00

Bit stuck with this one. I’m building a product image gallery for a Shopify

  • 0

Bit stuck with this one. I’m building a product image gallery for a Shopify shop that needs to have the following functionality:

  1. Thumbnails for each product image
  2. Medium-sized image that goes into the main image ‘container’
  3. Full-sized image that appears as a lightbox when you click the medium-sized image

So, you would click on a thumbnail which would load the medium sized image into the image container and then clicking on that medium sized image would show the full size image as a lightbox overlay.

Here’s my mark up:

<div id="imgcontainer">
                <a href="assets/product-fullsize.jpg" class="overlay"><img src="assets/product-main.jpg" alt="product-main" width="360" height="231" /></a>
            </div> <!-- End div#imgcontainer -->
            <div id="thumbs">
                <div class="thumbnav">
                    <ul>
                        <li><a href="assets/medium-1.jpg"><img src="assets/thumb-1.jpg" alt="thumb-1" width="100" height="70" /></a></li>
                        <li><a href="assets/medium-2.jpg"><img src="assets/thumb-2.jpg" alt="thumb-2" width="100" height="70" /></a></li>
                        <li><a href="assets/medium-3.jpg"><img src="assets/thumb-3.jpg" alt="thumb-3" width="100" height="70" /></a></li>
                        <li><a href="assets/medium-1.jpg"><img src="assets/thumb-1.jpg" alt="thumb-1" width="100" height="70" /></a></li>
                        <li><a href="assets/medium-2.jpg"><img src="assets/thumb-2.jpg" alt="thumb-2" width="100" height="70" /></a></li>
                        <li><a href="assets/medium-3.jpg"><img src="assets/thumb-3.jpg" alt="thumb-3" width="100" height="70" /></a></li>
                    </ul>
                </div> <!-- End div#thumbnav -->
                <a href="javascript:void(0);" class="tbpr">&nbsp;</a>
                <a href="javascript:void(0);" class="tbnx">&nbsp;</a>
            </div> <!-- End div#thumbs -->
        </div> <!-- End div#main -->

Can anyone recommend the best way to do this? Shopify uses a language called ‘Liquid’ that lets me use a ‘foreach’ statement to output markup for the images, or even just the three types of image urls (thumbnail, medium and fullsize).

Note that there is no simple naming convention for the image filename and location as they are generated on the fly, so I can’t just swap out the ‘medium’ part of the filename for ‘fullsize’ etc.

Thanks for any pointers,

Osu

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:45:16+00:00Added an answer on May 27, 2026 at 7:45 am

    Can you store the full-size urls as a data attribute on the anchors? E.g.,

    <li><a href="assets/medium-1.jpg" data-fullsize="assets/fullsize-1.jpg">
           <img src="assets/thumb-1.jpg" alt="..." /></a></li>
    

    Then you could use something like:

    $('a[data-fullsize]').click( function() {
         var $this = $(this);
         $('#imgcontainer a:first').attr('href',$this.data('fullsize'))
                                   .find('img')
                                   .attr('src',$this.attr('href'));
         return false;
    });
    $('#imgcontainer').on('click','a:first',function() {
         // load href into lightbox
         return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am bit stuck with this one.. what i want is update app_name (first
I'm a bit stuck on this one. In my PHP code, I query for
Bit stuck about how to go about this one. Given the current month, I
Ok, I'm a bit stuck on this one, can I actually do what I'm
I'm a bit stuck on this. Basically I want to do something like the
I'm a bit stuck with my code: def setVenueImage(img): img = images.Image(img.read()) x, y
I haven't implemented a search feature before and feel a bit stuck. I have
I'm working on learning Objective-C/Coaoa, but I've seem to have gotten a bit stuck
I have a list of (64-bit) addresses that represent a stack frame, and I
I seem to be a bit stuck on this, but my experience in Linq

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.