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

Not Replacing Inline CSS Style Image References #16

Open
3 tasks done
timnolte opened this issue Jan 12, 2024 · 0 comments
Open
3 tasks done

Not Replacing Inline CSS Style Image References #16

timnolte opened this issue Jan 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@timnolte
Copy link
Member

Describe the bug
When images are included in content like Blocks and used as CSS inline styles sometimes the images are not being replaced when they should be.

<figure class="wp-block-media-text__media" style="background-image:url(https://gateshosting-discocntr.ddev.site/wp-content/uploads/2024/01/GA17181207_MH657125-700x467.jpg);background-position:30% 44%"><img decoding="async" width="700" height="467" src="https://gateshosting-discocntr.ddev.site/wp-content/uploads/2024/01/GA17181207_MH657125-700x467.jpg" alt="A mother and two daughters peer into a toilet prototype on view in the Discovery Center." class="wp-image-13226 size-full" srcset="https://www.discovergates.org/wp-content/uploads/2024/01/GA17181207_MH657125-700x467.jpg 700w, https://www.discovergates.org/wp-content/uploads/2024/01/GA17181207_MH657125-250x167.jpg 250w, https://www.discovergates.org/wp-content/uploads/2024/01/GA17181207_MH657125-768x512.jpg 768w, https://www.discovergates.org/wp-content/uploads/2024/01/GA17181207_MH657125-1536x1025.jpg 1536w, https://www.discovergates.org/wp-content/uploads/2024/01/GA17181207_MH657125-120x80.jpg 120w, https://www.discovergates.org/wp-content/uploads/2024/01/GA17181207_MH657125.jpg 2000w" sizes="(max-width: 700px) 100vw, 700px"></figure>

Expected behavior
Validation of other dynamic/embedded content, including inline CSS should have images replaced.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only this plugin is active.
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

  • PHP Version: 8.1
  • WordPress Version: 6.4.2
  • Plugin Version: 1.1.1
@timnolte timnolte added the bug Something isn't working label Jan 12, 2024
@timnolte timnolte self-assigned this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant