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

Ensure we use the largest image size possible when scanning from the single edit view #235

Merged
merged 2 commits into from
Oct 19, 2020

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Oct 16, 2020

Description of the Change

Currently, when initiating a scan from the single edit screen, we are passing the image thumbnail to be processed. This can lead to unexpected results, results that don't match what we get on initial image processing or when scanning from the media modal view.

This PR fixes that to ensure we are passing the largest image size possible in this situation, to match the same image size we use in other scans.

Alternate Designs

None

Benefits

Scan results should now be the same no matter where they are initiated.

Possible Drawbacks

None

Verification Process

This will depend heavily on the image you're testing but I tested a text heavy image and got very different results from the media modal view compared to the single image edit view

  1. Setup the plugin
  2. Edit an existing image or upload a new one
  3. Select that image and in the image modal that pops up, click the button to rescan for alt text
  4. Take a note of what that text is
  5. Now go to the single edit screen for that image
  6. Check the box to rescan for alt text and save the image
  7. When the page refreshes, the alt text should still be the same

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

#234

…e use the largest image size possible, to ensure we get proper results
@jeffpaul jeffpaul added this to the 1.6.0 milestone Oct 16, 2020
@jeffpaul jeffpaul added the type:bug Something isn't working. label Oct 16, 2020
@jeffpaul jeffpaul linked an issue Oct 16, 2020 that may be closed by this pull request
dinhtungdu
dinhtungdu previously approved these changes Oct 17, 2020
Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeffpaul
Copy link
Member

@dkotter if you can resolve the merge conflict, then we're good to merge this one in... thanks!

@dkotter dkotter merged commit 4bbf7eb into develop Oct 19, 2020
@dkotter dkotter deleted the fix/manual-scan-edit-view branch October 19, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scanning images on the edit view doesn't always work as expected
3 participants