Skip to content

Complete responsive image integration#2457

Merged
pethers merged 5 commits into
mainfrom
copilot/optimize-image-resources
May 13, 2026
Merged

Complete responsive image integration#2457
pethers merged 5 commits into
mainfrom
copilot/optimize-image-resources

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Banner, logo, and article image assets need responsive variants across existing pages and future generated output. This updates the image pipeline and page markup so viewport-appropriate assets are consistently available and referenced.

  • Image generation

    • Added a sharp-based optimization script.
    • Generates AVIF/WebP banner and OG variants.
    • Generates PNG/WebP logo variants for common display sizes.
    • Runs image optimization at the start of prebuild.
  • Responsive markup

    • Uses <picture> for hero banners with AVIF/WebP sources.
    • Adds srcset/sizes for header, footer, static, and article logos.
    • Backfills existing generated HTML so current pages use responsive image resources.
  • Deployment metadata

    • Uploads image formats with explicit S3 content types.
    • Adds AVIF handling to S3 MIME repair.
  • Regression coverage

    • Verifies generated image variants exist with expected dimensions.
    • Enforces local HTML images use srcset or <picture>.
    • Verifies all local srcset image URLs resolve to generated assets.

Example generated markup:

<picture class="hero-banner-picture">
  <source type="image/avif" srcset="images/riksdagsmonitor-banner-480w.avif 480w, images/riksdagsmonitor-banner-1536w.avif 1536w" sizes="100vw">
  <source type="image/webp" srcset="images/riksdagsmonitor-banner-480w.webp 480w, images/riksdagsmonitor-banner-1536w.webp 1536w" sizes="100vw">
  <img src="images/riksdagsmonitor-banner.webp" class="hero-banner-bg" width="1536" height="1024" decoding="async">
</picture>

Copilot AI and others added 4 commits May 13, 2026 09:43
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/54d60128-fa2d-4a87-bed3-240bc73954f4

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@github-actions github-actions Bot added dashboard Interactive dashboards (Chart.js/D3.js) html-css HTML/CSS changes i18n Internationalization/localization translation Translation updates rtl RTL language support (Arabic, Hebrew) news News articles and content generation size-xl Extra large change (> 1000 lines) labels May 13, 2026
@pethers pethers marked this pull request as ready for review May 13, 2026 10:49
Copilot AI review requested due to automatic review settings May 13, 2026 10:49
@pethers pethers merged commit fb60f27 into main May 13, 2026
15 checks passed
@pethers pethers deleted the copilot/optimize-image-resources branch May 13, 2026 10:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions
Copy link
Copy Markdown
Contributor

🏷️ Automatic Labeling Summary

This PR has been automatically labeled based on the files changed and PR metadata.

Applied Labels: dashboard,html-css,i18n,translation,rtl,size-xl,news

Label Categories

  • 🗳️ Content: news, dashboard, visualization, intelligence
  • 💻 Technology: html-css, javascript, workflow, security
  • 📊 Data: cia-data, riksdag-data, data-pipeline, schema
  • 🌍 I18n: i18n, translation, rtl
  • 🔒 ISMS: isms, iso-27001, nist-csf, cis-controls
  • 🏗️ Infrastructure: ci-cd, deployment, performance, monitoring
  • 🔄 Quality: testing, accessibility, documentation, refactor
  • 🤖 AI: agent, skill, agentic-workflow

For more information, see .github/labeler.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Interactive dashboards (Chart.js/D3.js) html-css HTML/CSS changes i18n Internationalization/localization news News articles and content generation rtl RTL language support (Arabic, Hebrew) size-xl Extra large change (> 1000 lines) translation Translation updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants