4 ms·
Those previews are great! I like that I can start reading the article before clicking it.
by ottobonn 4y ago
Those previews are great! I like that I can start reading the article before clicking it.
- croshan 4y agoThanks! At first they were rendered HTML of the entire article (because nextjs makes that easy), but that caused performance issues, especially on mobile Safari. So now they're auto-generated screenshots. Glad you like them!
- kevincox 4y agoThat's kinda a shame from a size POV. The screenshots are 1/2MiB each for a bit of text and common styles. I wonder if it would be feasible to go back to HTML but somehow smartly decide where to chop off the article to avoid much overflow, image downloads and whatnot.
- croshan 4y agoRight? The problem is articles could potentially have early media content, specifically a fat youtube iframe, in the case of the DIY 3d scanner article. I'm glad for this feedback, though. I'll play around with slightly dropping image quality (currently it's JPEG output at quality = 100), and lazy-loading.
- kevincox 4y agoYeah, I saw the iframe and it definitely made me think. You could filter out "expensive" elements or smartly replace them with a thumbnail but eventually you will slowly go crazy. The image preview approach is definitely the sane and simple solution. It just feels less elegant. I would have a hard time resisting the urge to make it work somehow.