Skip to content

Conversation

@gabridevs
Copy link

What problem is this solving?

This change improves page performance by ensuring the main product image is prioritized during loading. By setting the fetchpriority: 'high' for the first product image, we ensure that the most important image (usually the first one) is loaded first, enhancing user experience, especially for pages with multiple images.

How to test it?

You can test this change by visiting the following workspace where the branch is linked. Check the loading behavior of the first product image, ensuring it is loaded before others when opening a product page.

[Workspace](Link goes here!)

Screenshots or example usage:

Screenshot 2024-10-16 alle 19 57 52

Describe alternatives you've considered, if any.

No alternatives considered as fetchpriority: 'high' is a straightforward and effective solution for this problem.

@gabridevs gabridevs requested a review from a team as a code owner October 17, 2024 09:19
@vtex-io-ci-cd
Copy link
Contributor

vtex-io-ci-cd bot commented Oct 17, 2024

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@gabridevs
Copy link
Author

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

* [ ]  Patch (backwards-compatible bug fixes)

* [x]  Minor (backwards-compatible functionality)

* [ ]  Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

* [ ]  No thanks, I would rather do it manually 😞

Copy link
Contributor

@vmourac-vtex vmourac-vtex left a comment

Choose a reason for hiding this comment

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

This PR seems to be based on the same branch as of #1120.
If this was not done for a specific reason, I would ask to make them independent of each other in case we need to rollback any specific deploy

@vmourac-vtex
Copy link
Contributor

I would also request that you:

  • fix conflicts in CHANGELOG.md
  • provide an up to date and working workspace

@gabridevs
Copy link
Author

gabridevs commented Jun 25, 2025

I would also request that you:

* fix conflicts in `CHANGELOG.md`

* provide an up to date and working workspace

Hi @vmourac-vtex i have update workspace and CHANGELOG.md

@vmourac-vtex
Copy link
Contributor

@gabridevs it seems you missed some some of the requests in earlier messages. We could also improve on the way you handled the CHANGELOG.md fix. I'll summarize what still needs to be done here:

  • This PR should only contain the changes related to this task. Currently it is mixed with Configurable thumbnail dimensions in product gallery #1120. Please recreate/interactively rebase, etc, in order to only include commits and changes related to the task proposed in the PR
  • Fix conflicts on CHANGELOG.md - You fixed the conflicts by removing your changes in this file. The root issue was that your branch diverged from this repo master branch. Reconcile the branches and then add to CHANGELOG.md what you added/removed/changed in this PR

alt={alt}
title={alt}
loading={index === 0 ? 'eager' : 'lazy'}
{...((index === 0 ? { fetchpriority: 'high' } : {}) as any)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{...((index === 0 ? { fetchpriority: 'high' } : {}) as any)}
fetchpriority={index === 0 ? 'high' : 'auto'}

Copy link
Author

Choose a reason for hiding this comment

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

hi @vmourac-vtex , I close this PR as we have developed a custom component in our store.
Thank you for the support!

@gabridevs gabridevs closed this Jul 16, 2025
@gabridevs gabridevs deleted the feature/pdp-fetch-priority branch July 16, 2025 16:25
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