respimagelint
respimagelint copied to clipboard
Image widths modified by object-fit don’t get detected correctly
Any value for the CSS property object-fit other than fill can result in an image width that differs from img.clientWidth in https://github.com/ausi/respimagelint/blob/50165774844675cae2c8adbfa35ff46204847621/src/collector/readDimensions.js#L168
This property should be taken into account.
Sadly, there seems to be no JavaScript API for accessing the actual display image size inside the <img> if object-fit is used.