Expanded View of Image from Button Click Without Using a Lightbox?

I know how to code buttons, and I know how to get the URL of images I’ve uploaded to Wix. But how can I initiate an expanded view of an image from a button click “without” using a lightbox?

I ask because lightboxes are presently broken. When viewing a non-mobile site from a phone, the lightbox crops everything on the page, except for the overlay background. So, I need (and would rather) code a solution.

Looking forward to your ideas/direction.

Thank you.

Hello. My first question is about the light boxes. Did you submit a bug? If you haven’t yet, the instructions on how to do so are linked below.

How to report a bug

As for another idea, this is untested by me but the first thing that comes to mind is swapping the src of the image on click to the larger version? This of course assumes you are storing a thumbnail and full image separately.

Thank you for reaching out!

I have not reported this as a “bug,” but below is a link to my write-up of the issue, posted yesterday. I did, however, contact customer support about the issue. The customer support contact portal promised a callback, but I’ve received none.

You can see in the post the issue surrounding lightboxes. I’ve included screenshots of a lightbox I was working on and my test of an unmodified drag-n-drop lightbox. Both show the same issue.

Post link click here !

Oddly, they were working (i.e. easier to fix) just a few days ago. Now, my “fix” doesn’t work. I associate this to the recent change in strip behavior, though I have no causal evidence, just correlative.

If it’s possible to simply code around the issue, that would suit me well, as Wix seems to tweak features often, resulting in features I can’t altogether count on.

QUICK UPDATE:

I did in fact report this “bug” to support. I followed the link you provided, and I did use the portal as you suggested above. So, a report has been sent.

As for your suggestion. I did try that, but the expanded view of images has a full-screen overlay that I do need for my project. The only thing that I know of that has such an overlay is a lightbox, so I’m hoping there’s a solution I’m not aware of, hence my post.

@davidallenfarrell Ah, okay that’s good. Customer care does not work in the forum so I wanted to make sure you reported your issue in case it does turn out to be a bug versus something else.

I have not specifically worked with a light box for expanding images, so I will have to think on any other suggestions and get back to you. And perhaps someone else from the community will offer an idea as well. When you hear back about your support ticket, please let us know what they say

@amandam I definitely will let you know if customer care contacts me with a solution. I’m chomping at the bit, honestly. I have a temporary solution, but it only works for single images. My solution is a species of your thumbnail idea. I used a hover box. But I will need a galleries to illustrate some points to my community members, and only lightboxes offer that.

Here’s hoping for a prompt reply. I’m sure many others are having similar issues. In fact, there may be many non-mobile sites having problems right now, and the admins of those sites are unaware that the light boxes they have are now malfunctioning.

I very much look forward to the fix.

Thank you, Amanda.

@amandam Hmm. . . My last response didn’t save.

Oh, well. I was thanking you for your help and told you that I would definitely provide the solution given to me by customer care. I’m working with them right now, in fact. But here’s something you might be able to help me with:

Is there a way to attach content in a lightbox to the lightbox area using code?

Currently, you cannot attach items like you can with container boxes and strips. But maybe this can be done with code. If so, the parent might take on the dimensions of the child, forcing the lightbox area to adopt the same constraints.

This post has Tips for Working with Lightboxes

And this link to the API docs shows how to pass data to the lightbox

Will passing the data this way work in your scenario?

As for my curiosity, if I have a chance later I will try to recreate your issue to see if I notice anything. Can you tell me the exact steps you used to set up your lightbox image so i know i’m testing the same thing? Even which lightbox template you dragged onto the page, etc

And to clarify you only see this issue on an actual mobile device, not in the mobile editor on the website?

@amandam I did try coding it. The problem is the lightbox constraints. You can call for content any way you like and trigger the box by any means, but the lightbox won’t conform to the width of the content called.

Here is what I believe may be happening:

Lightboxes may independently check formfactor. On non-mobile sites, this check should be disabled. The lightbox performs the check and sizes itself accordingly. And so, you get a background that’s “normal” but a lightbox area that has conformed for mobile use.

Customer care is check out the issue now. They are running into the same issue, apparently. So, I’m waiting on their fix.

Fingers crossed.

@davidallenfarrell Oh that’s great news! Glad they are on it.

@amandam I’m sorry to report that customer care did fix the issue, but the issue is fixed, perhaps, only for my site. I leave it to you to test and press the issue further, as I’m quite a bit behind schedule.

I did notice that my phone no longer prompts me to rotate the display if I tilt my phone while viewing my site, but at least I’m showing the contents in full.

I can live with the lack of rotation. I may address that issue later on down the road. But I should note that customer care never contacted me after they fixed the issue. I simply kept track.

Ah. . . What can you do.

Wonderful service though. Wix jumped right on it, and things work great!

Thank you,
Loyal Wix user for more than a decade now.