Dynamic image src problem

not sure why but this page has been working for several years.

PAGE: https://www.marsalstudios.com/client_gallery_universal.php?gallery_id=Weddings

The page retrieves a set of dynamic images with titles from a mysql database. I upgraded to 3.8.1 yesterday and this page now doesn’t retrieve the images, just the titles. The images are in a field called front_photo_location which just contains the filename not filepath. I add the path which is shown in the code as dmx-bind:src="‘images/’+front_photo_location"

Is there a change I need to be aware of to dynamically assign the images?

Please help. My customer noticed this before I did.
Thanks,
Rick

Here is the section of code which retrieves the image for the query

<div align="center" dmx-text="" dmx-on:click="">

          <img align="center" class="mt-auto mb-auto ml-auto mr-auto w-80 img-fluid rounded flex-grow-1 flex-shrink-1 w-auto h-auto mt-xl-auto mb-xl-auto ml-xl-auto mr-xl-auto" dmx-bind:src="'images/'+front_photo_location"

            dmx-animate-inview:10.duration:200="fadeIn" dmx-animate-outview.duration:200="fadeOut" dmx-on:click="browser1.goto('client_theater_weddings.php?event_id='+event_id)" dmx-lazyload-dynamic=""><br><br>

I am not sure how this worked until now with the following code:

<div align="center" dmx-text="" dmx-on:click="">

but it is wrong. dmx-text="" should be removed from there, what it currently does it to make the content of this div empty, because of the expression.

Also, you should consider reviewing your code. align="center" should no longer be used, it’s 2021 and we are using HTML5, the align attribute should NOT be used. You should be using CSS to align your items, not this obsolete attribute.

thanks, that worked. I haven’t touched this code literally in over 10 years. I think it might have even been created with the pre-wappler dmx toolset, don’t remember. But it has always worked. Nonetheless, when I removed the “text” reference as you pointed out, it worked right away. I will take a look at redesigning this page at some point this year. I guess it’s the “not broken, don’t fix it” attitude but do want to update it.

Thanks again for your help,
Rick

1 Like