Posts

HOW TO Add a Backup Image in HTML When the Main Image Fails to Load

In HTML, an image can use a backup source with the onerror event. The browser first tries to load the main image from src. If that image is missing, blocked, or fails to load, onerror runs and replaces it with a fallback image.  <img   src="actual-image.jpg"   alt="Product image"   onerror="this.onerror=null; this.src='backup-image.jpg';" > The JavaScript code  this.onerror=null   prevents an infinite loop if the backup image also fails. That prevents an endless loop if the backup image also fails. Without it, the browser could keep triggering onerror again and again. This technique is useful for product images, profile photos, brand logos, or any place where a missing image should show a placeholder instead of a broken image icon. For multiple responsive image options, use <picture>, but that is for format/viewport fallback, not broken-image fallback: <picture>   <source srcset="image.webp" type="image/webp...

This Week I Learned - Week 20 2026

Image
This Week I Learned -  * GoatCounter is an open source web analytics platform available as a free donation-supported hosted service or self-hosted app. It is a privacy-friendly web analytics alternative to Google Analytics or Matomo. *  MotherDuck  is a collaborative serverless analytics platform that lets you query and analyze data in cloud databases and from cloud storage, using your browser or any of the DuckDB APIs.  * Cloudflare has built its own version of WordPress that solves some security issues with the older CMS—it’s called EmDash. * Apple reported an 84% first-quarter rise in new apps on its App Store, putting it on a pace to surpass 2025’s 600K apps.  * Contrary to the predictions of an AI jobpocalypse, I predict the opposite: There will be an AI jobapalooza! - Andrew Ng * The Batch - As OpenAI prepares to discontinue the Sora app and API, ByteDance added Seedance 2.0, its multimodal video generator, to its popular video-editing app CapCut - the s...

Google Summer of Code 2026: Open Food Facts

Image
Google Summer of Code (GSoC) has long been the ultimate launchpad for aspiring developers. As Google’s premier global open-source program, it offers contributors the rare opportunity to work on live open-source software projects alongside some of the world’s most respected and seasoned developer communities. But as open-source engineering continues to take center stage globally, getting a foot in the door has evolved from a difficult challenge into an elite competitive arena.   The scale of this competition was fully on display for the GSoC 2026 cohort. Globally, the program saw a massive influx of 15,245 applicants , all vying for a coveted spot. Out of those thousands of hopefuls, only 1,141 contributors were selected worldwide. This places the global acceptance rate at a razor-thin ~7% , a metric that makes GSoC more selective than many Ivy League institutions. Open Food Facts & GSoC For the contributors who do beat the odds, they get to write code that directly ...