-
Notifications
You must be signed in to change notification settings - Fork 894
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
Use proper URL for resized images in the ImageObject schema #21622
base: trunk
Are you sure you want to change the base?
Use proper URL for resized images in the ImageObject schema #21622
Conversation
…nd that's resized
…-url-in-the-imageobject-schema
Pull Request Test Coverage Report for Build 56f1fadb2994cbd9f62ed3dcddf54cdd60d52596Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
… of filenames and unify them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the test, since you implemented Regex in two methods, I would expect to have some data provider with cases for the unhappy path.
Context
ImageObject
node of the schema is being retrieved by the first content image and that image is resized in the content, we need to use the resized URL for the node's attributes, not its full-sized counterpart.Summary
This PR can be summarized in the following changelog entry:
ImageObject
when it uses the first content image and that's a resized one, by using the URL of the resized image instead of its full-width counterpart.Relevant technical choices:
-<width>x<height>.file_extension
-<width>x<height>.file_extension
format get renamed, so we won't have false positives.-<width>x<height>.file_extension
format has been manually uploaded to the server and gets added via custom HTML, the output of the schema stays the same with trunk, because we can't retrieve its ID and the fallbacksimple_image_object()
method is used for schema output.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
ImageObject
.Before this PR:
With this PR:
because the post will have a
<img src="https://example.com/wp-content/uploads/2023/02/example-300x300.png">
image in its contentRelevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo]
, added test instructions for Shopify and attached theShopify
label to this PR.Documentation
Quality assurance
Innovation
innovation
label.Fixes #19848