<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bibble.co.nz/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Image_Handling</id>
	<title>Image Handling - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bibble.co.nz/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Image_Handling"/>
	<link rel="alternate" type="text/html" href="https://wiki.bibble.co.nz/mediawiki/index.php?title=Image_Handling&amp;action=history"/>
	<updated>2026-04-18T02:54:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.bibble.co.nz/mediawiki/index.php?title=Image_Handling&amp;diff=11199&amp;oldid=prev</id>
		<title>Iwiseman: Created page with &quot;= Handling Images and Responsive Banners =  This page documents the correct way to handle images, videos, and responsive banners in the site.   It focuses on three concepts:  * &#039;&#039;&#039;Intrinsic dimensions&#039;&#039;&#039; – define the layout shape   * &#039;&#039;&#039;Responsive variants&#039;&#039;&#039; – define which file the browser downloads   * &#039;&#039;&#039;Object-fit / object-cover&#039;&#039;&#039; – define how media fills the box    Understanding these three layers makes banners predictable and prevents layout shift.  == 1. In...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.bibble.co.nz/mediawiki/index.php?title=Image_Handling&amp;diff=11199&amp;oldid=prev"/>
		<updated>2026-04-17T02:06:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Handling Images and Responsive Banners =  This page documents the correct way to handle images, videos, and responsive banners in the site.   It focuses on three concepts:  * &amp;#039;&amp;#039;&amp;#039;Intrinsic dimensions&amp;#039;&amp;#039;&amp;#039; – define the layout shape   * &amp;#039;&amp;#039;&amp;#039;Responsive variants&amp;#039;&amp;#039;&amp;#039; – define which file the browser downloads   * &amp;#039;&amp;#039;&amp;#039;Object-fit / object-cover&amp;#039;&amp;#039;&amp;#039; – define how media fills the box    Understanding these three layers makes banners predictable and prevents layout shift.  == 1. In...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Handling Images and Responsive Banners =&lt;br /&gt;
&lt;br /&gt;
This page documents the correct way to handle images, videos, and responsive banners in the site.  &lt;br /&gt;
It focuses on three concepts:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Intrinsic dimensions&amp;#039;&amp;#039;&amp;#039; – define the layout shape  &lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Responsive variants&amp;#039;&amp;#039;&amp;#039; – define which file the browser downloads  &lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Object-fit / object-cover&amp;#039;&amp;#039;&amp;#039; – define how media fills the box  &lt;br /&gt;
&lt;br /&gt;
Understanding these three layers makes banners predictable and prevents layout shift.&lt;br /&gt;
&lt;br /&gt;
== 1. Intrinsic Dimensions (Layout Shape) ==&lt;br /&gt;
&lt;br /&gt;
Intrinsic dimensions define the &amp;#039;&amp;#039;&amp;#039;aspect ratio&amp;#039;&amp;#039;&amp;#039; of the banner container.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;aspect-ratio: 1200 / 450&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This does NOT need to match the actual pixel size of any image or video.  &lt;br /&gt;
It only defines the &amp;#039;&amp;#039;&amp;#039;shape you want rendered&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key points ===&lt;br /&gt;
* Intrinsic dimensions prevent layout shift (CLS)&lt;br /&gt;
* They define the final visible shape of the banner&lt;br /&gt;
* They are independent of the actual media files&lt;br /&gt;
* Any pair with the same ratio is valid (e.g., 24/9, 2400/900, 1200/450)&lt;br /&gt;
&lt;br /&gt;
== 2. Responsive Variants (File Selection) ==&lt;br /&gt;
&lt;br /&gt;
Variants define which file the browser should download at different breakpoints.&lt;br /&gt;
&lt;br /&gt;
Example variant entry:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;size&amp;quot;: &amp;quot;md&amp;quot;,&lt;br /&gt;
  &amp;quot;width&amp;quot;: 768,&lt;br /&gt;
  &amp;quot;height&amp;quot;: 256,&lt;br /&gt;
  &amp;quot;mediaQuery&amp;quot;: &amp;quot;(min-width: 481px) and (max-width: 768px)&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These dimensions are &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; used for layout.  &lt;br /&gt;
They are only used to build URLs such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
bill-banner_md_768x256.webp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Key points ===&lt;br /&gt;
* Variants exist only to help the browser choose the correct file&lt;br /&gt;
* They do not control the rendered size&lt;br /&gt;
* They may be cropped or letterboxed versions of the full image&lt;br /&gt;
* They must match the naming convention used by the image pipeline&lt;br /&gt;
&lt;br /&gt;
== 3. Fallback Images for Video Banners ==&lt;br /&gt;
&lt;br /&gt;
Video banners use a fallback image when autoplay fails.&lt;br /&gt;
&lt;br /&gt;
The fallback image should always use the &amp;#039;&amp;#039;&amp;#039;largest&amp;#039;&amp;#039;&amp;#039; variant so it looks sharp on desktop.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;size&amp;quot;: &amp;quot;lg&amp;quot;,&lt;br /&gt;
  &amp;quot;width&amp;quot;: 1200,&lt;br /&gt;
  &amp;quot;height&amp;quot;: 400&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fallback image is then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
bill-banner_lg_1200x400.webp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 4. How Media Fills the Banner ==&lt;br /&gt;
&lt;br /&gt;
All media (video or image) uses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
object-fit: cover;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This means:&lt;br /&gt;
&lt;br /&gt;
* The media fills the intrinsic box&lt;br /&gt;
* It may crop to maintain its own aspect ratio&lt;br /&gt;
* The intrinsic ratio always wins&lt;br /&gt;
&lt;br /&gt;
== 5. Summary ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Intrinsic dimensions&amp;#039;&amp;#039;&amp;#039; define the shape of the banner  &lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Variants&amp;#039;&amp;#039;&amp;#039; define which file is downloaded  &lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;object-cover&amp;#039;&amp;#039;&amp;#039; ensures the media fills the box  &lt;br /&gt;
* The fallback image should always be the largest variant  &lt;br /&gt;
* The intrinsic ratio should match the intended visual design (e.g., 24/9)&lt;br /&gt;
&lt;br /&gt;
== 6. Recommended Ratios ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Banner Type !! Ratio !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Cinematic strip || 24/9 (8:3) || Matches old site behaviour&lt;br /&gt;
|-&lt;br /&gt;
| Standard video || 16/9 || Matches most video exports&lt;br /&gt;
|-&lt;br /&gt;
| Ultra-wide hero || 32/9 || Very wide, minimal height&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Iwiseman</name></author>
	</entry>
</feed>