URL Not Supported (Lightbox)

We keep seeing URL Not Supported using Lightbox with a Dynamic Source. The images are located in sub directories under the unique reference for each item, therefore the source is similar to the following (also in a Repeat):

…/UploadsBLAH/blahMedia/assets/{{blahUID}}/images/{{blahFile}}

Any work-around or suggestions welcome as always.

Thank you in advance.

:slight_smile:

This UID is 62 characters in length, could this be the culprit?

*Edit: I changed the UID to 32 characters and the issue persists.

I had the same issue when using the lightbox. I can’t remember exacty what the problem was - perhaps I was usign curly brackets too. Anyway, it works now - eg like this:

dmx-bind:src="'img-detail/jpegs/' + img_filename"

Thanks Tom but that did not alleviate the issue unfortunately.

@TomD
The error is not coming from the img src. The lightbox is called from the <a> tag surrounding the image.

@Dave can you provide an example of how the rendered URL looks like?

Here you go Teodor:

https://BLAH.com/UploadsBlahFiles/BlahMedia/assets/LYt7mZiETjkLL75654pROHVu1DrcN543/images/7F8ED027-FC34-41A4-AE31-2C77C16F8139.jpg

. ./BLAH/UploadsBlahFiles/BlahMedia/assets/{{blahUID}}/images/{{medFile}}

*I know there is a space between the periods above, forum replaces two with three! :wink:

Thanks for your time.

Thanks Dave,
I’ll try to recreate this locally and test.

1 Like

I am having the same issue. Was there a solution for this?

You need an <a> tag surrounding your image with a hrefor dynamic dmx-bind:href attribute, pointing to the image file, then call the lightbox from this <a> tag …

1 Like

Hi @Teodor,

I’m missing something, could you please help me by pointing out the problem?

I get the “Url not supported” error for this:

<a href="https://fra1.digitaloceanspaces.com/tdhs3/published_projects/3347/2_6034e1ad.123767ff_d83bfae37a0c94d97ceebc2f52c0e20a1be72c6f.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=TATIVKLUB7HQKRDNIUQ6%2F20210625%2Ffra1%2Fs3%2Faws4_request&X-Amz-Date=20210625T183126Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=9c9cf681b59e8d9d9f025ac439a9e32286173e392f8d8140adca24b96d254601"
            dmx-lightbox=""><img
                src="https://fra1.digitaloceanspaces.com/tdhs3/published_projects/3347/2_6034e1ad.123767ff_d83bfae37a0c94d97ceebc2f52c0e20a1be72c6f.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=TATIVKLUB7HQKRDNIUQ6%2F20210625%2Ffra1%2Fs3%2Faws4_request&X-Amz-Date=20210625T183126Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=9c9cf681b59e8d9d9f025ac439a9e32286173e392f8d8140adca24b96d254601"
                width="100%"></a>

Same problem when I try a dynamic source (same style URL):

<a dmx-bind:href="signDownloadUrl" target="_blank" dmx-lightbox:lightbox_showcase=""><img dmx-bind:src="signDownloadUrl" class="rounded img-fluid"></a>

(The main goal is to use the dynamic version)

Thanks
Bence

@borbinka2 did it work for you, I am using the same way you mentioned, but it is not working for me.

With the latest changes, the url will not work unless there is a file extension specified.

1 Like

This has been improved in Wappler 5.3.2
The code has been updated to default to images when it can’t detect the type. You can also override the detection by selecting a content type in Lightbox UI. Currently image and video are supported types.

This topic was automatically closed after 47 hours. New replies are no longer allowed.