Re

React/web component for responsive images on steroids

Hacker News

React/web component for responsive images on steroids

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! [1]: https://iptc.org/std/photometadata/specification/IPTC-PhotoM... [2]: https://github.com/Frameright/react-image-display-control [3]: https://github.com/Frameright/image-display-control-web-comp... [4]: https://react.frameright.io/

Share card

Actual performance

17points
2comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: created · Missing: supports, reddit linkedin, podcasting
63%63% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Missing: mac, agents, macos
55%55% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
53%53% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
46%46% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
45%45% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
11%11% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

A
A responsive iconographic sidebar component for React50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A responsive iconographic sidebar component for React

Hacker News1
re
react select component45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

react select component

Hacker News1
Pl
Plx – React parallax component47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Plx – React parallax component

Hacker News2
Av
Avataaars React Component49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Avataaars React Component

Hacker News1
So
Sonner – an opinionated toast component for React51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sonner – an opinionated toast component for React

Hacker News2
Re
React Masonry Component47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

React Masonry Component

Hacker News1
Pa
Pagination-component. My first React component48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pagination-component. My first React component

Hacker News1
Re
React-hint – 150LoC Tooltip Component for React, Preact and Inferno48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

React-hint – 150LoC Tooltip Component for React, Preact and Inferno

Hacker News37
A
A lightweight, responsive simple grid component for React53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A lightweight, responsive simple grid component for React

Hacker News9
A
A React component to zoom images on hover60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A React component to zoom images on hover

Hacker News3