F
F
FreezkoSS2017-09-18 12:31:41
Ruby on Rails
FreezkoSS, 2017-09-18 12:31:41

Need to add an image to the gallery, can't install a large image?

For a more detailed review of the goods, I added a gallery found on the Internet, its difference from others is that the img tag contains the data-image parameter, which contains a link to a large image, here is the gallery itself:
e681776ce0fb479e8c95ba415444662c.png
as you can see, the small image has loaded, but the large one has not, here given code
dc0f2a4fec024bf583219afa7f79551c.png
Using the image tag, I was able to add a thumbnail image, but for a large one it doesn’t work, because there is no data-image parameter in the img tag. Is there a solution to this problem, or is it better to find a simpler gallery?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
N. Bekseitov, 2017-09-18
@FreezkoSS

<%= image_tag small_image_url, data: { image: big_image_url } %>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question