Skip to content

refactor: Rewrite parts of image rendering #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2025

Conversation

MoritzWeber0
Copy link
Member

  • Add error handling for pictures that are not found
  • Use image partial in render-image hook
  • Remove unused code

Copy link

netlify bot commented Jun 1, 2025

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 042e0b8
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/683ca0f9713bb9000888c4f7
😎 Deploy Preview https://deploy-preview-171--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- Add error handling for pictures that are not found
- Use image partial in render-image hook
- Remove unused code
@MoritzWeber0 MoritzWeber0 force-pushed the refactor/rending-of-images branch from afa7429 to 042e0b8 Compare June 1, 2025 18:50
@MoritzWeber0 MoritzWeber0 requested review from lenderom and Copilot June 1, 2025 18:54
Copy link

@Copilot 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.

Pull Request Overview

This PR refactors the image rendering logic by improving error handling, updating the image partial to support an "eager" loading parameter, and removing unused Sass code.

  • Switch from using "loadingLazy" to an "eager" flag in image rendering
  • Consolidate image resizing logic into a loop over width values in the image partial
  • Add a warning when an image resource is not found and update the deployment workflow to treat warnings as fatal

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
layouts/partials/stage.html Changed image partial parameter from "loadingLazy" to "eager"
layouts/partials/image.html Refactored image resizing logic and updated title attribute usage
layouts/_default/_markup/render-image.html Added error handling for local images with improved fallback logging
assets/sass/styles.scss Removed unused blank lines
.github/workflows/deploy.yaml Added the --panicOnWarning flag to the Hugo deploy command
Comments suppressed due to low confidence (1)

.github/workflows/deploy.yaml:68

  • The addition of the --panicOnWarning flag causes builds to fail on any warnings. Confirm that this behavior is acceptable for your deployment pipeline or consider handling warnings appropriately before failing the build.
--panicOnWarning

@lenderom lenderom merged commit ee62d51 into main Jun 1, 2025
7 checks passed
@lenderom lenderom deleted the refactor/rending-of-images branch June 1, 2025 19:02
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.

2 participants