Skip to content
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

Fix image srcset rewrites #7

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Fix image srcset rewrites #7

merged 1 commit into from
Jun 12, 2024

Conversation

DanielHudson2
Copy link
Member

Found that wp_get_attachment_image_attributes doesn't run for every image, only seems to run for featured images, unclear if this is a bug or not.
wp_get_attachment_image uses wp_calculate_image_srcset, so I have applied a filter to this and called the update_image_url function on each item in the srcset

left the old function in there for now as i was unsure if it is still needed

@DanielHudson2 DanielHudson2 self-assigned this Jun 11, 2024
@DanielHudson2 DanielHudson2 linked an issue Jun 11, 2024 that may be closed by this pull request
@brettsmason
Copy link
Member

Tested and confirmed working - thanks Dan!

@brettsmason brettsmason merged commit 20bd124 into main Jun 12, 2024
1 check failed
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.

Remote files not working with responsive images
2 participants