Skip to content

perf: improve blog and homepage image performance (lazy-loading, responsive, docs) #264#268

Open
Shivampal157 wants to merge 1 commit intoOpenScienceLabs:mainfrom
Shivampal157:perf/image-performance-264
Open

perf: improve blog and homepage image performance (lazy-loading, responsive, docs) #264#268
Shivampal157 wants to merge 1 commit intoOpenScienceLabs:mainfrom
Shivampal157:perf/image-performance-264

Conversation

@Shivampal157
Copy link

Summary

Improves image performance on the blog and homepage by adding lazy-loading, responsive sizing, and documentation for authors.

Closes #264

Changes

  • Lazy-loading: Added loading="lazy" and decoding="async" to partner logos (partners page + homepage), event thumbnails, team member photos, project badge images, blog related-posts thumbnails, footer CC image, and blog content images (via JS for markdown-rendered images in .post_body).

  • Responsive images: Blog content images (.post_body img) now use max-width: 100%, height: auto, and a small min-height to reduce layout shift when dimensions are unknown.

  • Documentation: New "Authoring images (performance and accessibility)" section in CONTRIBUTING.md (alt text, recommended dimensions, optional WebP).

Acceptance criteria (from issue)

  • Lazy-loading and explicit dimensions where applicable for better Lighthouse scores (e.g. "Defer offscreen images", "Image elements have explicit width and height").
  • Responsive behavior for blog content images.
  • No intentional visual regressions on desktop and mobile.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Shivampal157 Shivampal157 force-pushed the perf/image-performance-264 branch from 9f55300 to a51d8aa Compare March 14, 2026 20:41
@Shivampal157
Copy link
Author

Hi @xmnlab,

This PR now only addresses issue #264 (image performance). I rebased the branch on upstream/main so it has a single commit:

  • Lazy-loading (loading="lazy", decoding="async") on blog, partners, home, events, team, projects, and footer images
  • Responsive CSS for blog content images (max-width: 100%, height: auto)
  • "Authoring images" section in CONTRIBUTING.md

Please review when you have time.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: improve blog and homepage image performance (responsive sizes, lazy-loading, webp)

1 participant