-
Notifications
You must be signed in to change notification settings - Fork 157
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
Check for an existing image before processing media on the target site. #1296
Conversation
…ia based on from where it was pulled/pushed.
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.
This looks good to me and tests well, thanks.
Just a minor note inline to include the data provider param annotations in the test's docblock. Otherwise I think it's good to go.
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.
Thanks for the follow up, this looks good to merge.
Description of the Change
As reported in #765, when the same image is used in multiple posts and these posts are distributed to connected sites, the media files are imported for each post, creating duplicate copies of the images on the target sites. This PR fixes the media duplication issue by checking for existing media on the target site before creating new media.
Closes #765
How to test the Change
Changelog Entry
Credits
Props @philbraun @jeffpaul @iamdharmesh
Checklist: