<!DOCTYPE html>
<html class="reftest-wait">
  <link rel="match" href="image-loading-lazy-slow-aspect-ratio-ref.html">
  <link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org">
  <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element">
  <script src="/common/reftest-wait.js"></script>
  <img id=target loading="lazy"
      width="200" height="100" style="width: 100px; height: auto; border: 1px solid black">
<script>
  let loaded = false;
  target.onload = () => {
    if (loaded) return;
    loaded = true;
    target.src = "";
    requestAnimationFrame(() => requestAnimationFrame(() => {
      target.src = "resources/image.png?slow-aspect-ratio&pipe=trickle(d2)";
      takeScreenshot();
    }));
  };
  target.src = "resources/image.png?slow-aspect-ratio";
</script>
