TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

BBC-News/Imager.js

109 pointsby anu_guptaover 11 years ago

8 comments

aytekinover 11 years ago
There is no live demo on the github site. Here is a nice demo found on google: <a href="http://firegoby.com/imager-cssbackgrounds" rel="nofollow">http:&#x2F;&#x2F;firegoby.com&#x2F;imager-cssbackgrounds</a>
andrewingramover 11 years ago
Nice, but wouldn&#x27;t work for our use case at onefinestay, for two reasons:<p>1 - We use thumbor for serving our images, so changing the width in the URL isn&#x27;t enough, you also need to change the crop parameters and the anti-tamper signing part.<p>2 - We actually use different markup in places, some of our homepage slides use 2 or 4 images at desktop sizes, but only 1 at tablet and smaller.<p>What we&#x27;re doing is using a modified version of picturefill.js, where we wrap each picture component in another component that controls what widths we load it at.<p>You can see it in play here: <a href="http://www.onefinestay.com/" rel="nofollow">http:&#x2F;&#x2F;www.onefinestay.com&#x2F;</a>
评论 #6873906 未加载
评论 #6874260 未加载
mk3over 11 years ago
BBC uses name of already existing npm package for their install instructions. And in issues one of the programmers I suppose suggests asking to madhums to rename original library :) Strange line of thought.
评论 #6875786 未加载
tomeldersover 11 years ago
Looking through their resources the important images are all Jpegs, so I would have thought the overly compressed JPEG@2x solution would work for them. I also see a few individual PNGs, some of them individual icons, the other sprite sheets. Perhaps they&#x27;d be better off using webfonts for icons, or Base64 encoding images into the sprite sheets with SASS.<p>My gut feeling is that this solution might be more complicated than the problem.
评论 #6874252 未加载
ericcholisover 11 years ago
A nice solution, but it still leaves me wanting a more native option. Word of warning, if you implement this, be sure to have a good image sitemap for search engines to digest.<p>Image Sitemap Schema: <a href="https://support.google.com/webmasters/answer/178636?hl=en" rel="nofollow">https:&#x2F;&#x2F;support.google.com&#x2F;webmasters&#x2F;answer&#x2F;178636?hl=en</a>
trekky1700over 11 years ago
Between BBC and The Guardian both open sourcing components on the Hacker News homepage, this seems like a good trend. Thank you BBC.
tlongrenover 11 years ago
Seems like this is posted every few weeks or so.
elwellover 11 years ago
BBC-News team writes great code apparently!