workeffortwaste / horseman

The detailed update and issue repository for the Horseman crawler.
https://gethorseman.app/
16 stars 0 forks source link

Image Missing Sizes seems to trip up on <picture> #106

Closed dwsmart closed 1 year ago

dwsmart commented 1 year ago

The Image Missing Sizes snippet seems to return false positives for <picture> elements.

Example Page, for this element:

<picture>
<source srcset="https://tamethebots.com/dimg/21a8efd4-f5c7-4a0f-8a31-fcba701e1ece.avif" type="image/avif">
<source srcset="https://tamethebots.com/dimg/108a1753-3473-41dc-9e9b-8037d6898be4.webp?key=twsm 640w, https://tamethebots.com/dimg/108a1753-3473-41dc-9e9b-8037d6898be4.webp?key=twmd 768w" type="image/webp">
<img src="https://tamethebots.com/dimg/a5f5113e-c0c8-4481-9283-91104cebe4c8.png?key=twmd" srcset="https://tamethebots.com/dimg/a5f5113e-c0c8-4481-9283-91104cebe4c8.png?key=twsm 640w, https://tamethebots.com/dimg/a5f5113e-c0c8-4481-9283-91104cebe4c8.png?key=twmd 768w" alt="HREFLANG Tools" width="1248" height="450" class="rounded-t-sm" loading="" fetchpriority="high" decoding="auto">
</picture>

The snippet misses the height and width attributes and reports:

<img src="https://tamethebots.com/dimg/a5f5113e-c0c8-4481-9283-91104cebe4c8.png?key=twmd" srcset="https://tamethebots.com/dimg/a5f5113e-c0c8-4481-9283-91104cebe4c8.png?key=twsm 640w, https://tamethebots.com/dimg/a5f5113e-c0c8-4481-9283-91104cebe4c8.png?key=twmd 768w" alt="HREFLANG Tools" width="1248" height="450" class="rounded-t-sm" loading="" fetchpriority="high" decoding="auto">

in the HTML column: image-size

workeffortwaste commented 1 year ago

This is actually checking for the sizes attribute that your example is missing.

dwsmart commented 1 year ago

D'oh!

Sorry for the misunderstanding here!

workeffortwaste commented 1 year ago

I think it identifies I should name it better.