headstartwp
headstartwp copied to clipboard
feat: modify image config depending on next version
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.