W
W
WebforSelf2021-03-23 22:24:33
HTML
WebforSelf, 2021-03-23 22:24:33

Where to add the data-src attribute?

Yandex writes the following in the documentation

For images from the site to be included in the Yandex.Images search, the pages of the site must be indexed. Image information is retrieved from indexed pages.

Images are downloaded using links from the src attribute of the img tag, as well as the data-src and data-original attributes (in this case, the presence of a link to the image in the src attribute is not necessary).


<a href="/files/products/DSC03515.800x600w.JPG" class="zoom" data-rel="group">
<img  src="/files/products/DSC03515.200x200.JPG" alt="часы">
</a>


I had it like this, so that a large image is indexed, and not 200 by 200, then I added

<a href="/files/products/DSC03515.800x600w.JPG" class="zoom" data-rel="group">
<img data-src="/files/products/DSC03515.800x600w.JPG" src="/files/products/DSC03515.200x200.JPG" alt="часы">
</a>


Is it correct to add it to the img tag? or maybe a link? how is it correct?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-03-23
@WebforSelf

Correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question