Hey, OP here. This is hopefully interesting, especially for front-end developers. Nowadays images (JPEG, PNG, ...) can contain so-called Image Regions in their metadata [1] like cropping regions or regions of interest. So we've created a React component [2] that responsively displays the "best" cropping region, i.e. the one with the ratio closest to the current `<img>` element size. If you don't use React we have also built a web component. [3] With this approach you no longer have to worry about whether the size of your assets will match the ratio of their containers on all devices. The displayed image will always make sense and you don't need to maintain a bunch of hard crops anymore. Check out our demo [4] to see it in action. Feel free to ask us any questions, provide feedback, or contribute. We hope this will be useful to someone!<p>[1]: <a href="https://iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#image-region" rel="nofollow noreferrer">https://iptc.org/std/photometadata/specification/IPTC-PhotoM...</a><p>[2]: <a href="https://github.com/Frameright/react-image-display-control">https://github.com/Frameright/react-image-display-control</a><p>[3]: <a href="https://github.com/Frameright/image-display-control-web-component">https://github.com/Frameright/image-display-control-web-comp...</a><p>[4]: <a href="https://react.frameright.io/" rel="nofollow noreferrer">https://react.frameright.io/</a>
Very nice. Added to <a href="https://github.com/brillout/awesome-react-components">https://github.com/brillout/awesome-react-components</a>.