tomayac’s avatartomayac’s Twitter Archive—№ 16,843

  1. …in reply to @simevidas
    @simevidas I would use what developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/naturalWidth tells you. The natural width is the intrinsic width, corrected by pixel density. You probably also might want to use both src and srcset (example: webkit.org/demos/srcset/) if you care for devices which don’t need high-density imagery.