headstartwp icon indicating copy to clipboard operation
headstartwp copied to clipboard

feat: modify image config depending on next version

Open sambrodie opened this issue 6 months ago • 4 comments

Description of the Change

images.remotePatterns requires a minimum Next.js version, 14. Rather than updating the config to always use remotePatterns, this change will detect the Next version from the project's package.json file, and then use remotePatterns if the version is >=14 or domains if the version is <14.

Closes https://github.com/10up/headstartwp/issues/812

Changelog Entry

Added check for Next version and configuration properties.

Checklist:

  • [x] I agree to follow this project's Code of Conduct.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my change.
  • [ ] All new and existing tests pass.

sambrodie avatar Jul 31 '24 20:07 sambrodie