xwp / unsplash-wp

GNU General Public License v2.0
9 stars 3 forks source link

Discovery - WP 5.5 image editing tools may break the Unsplash plugin #173

Closed bmattb closed 4 years ago

bmattb commented 4 years ago

Feature description

WP 5.5 scheduled for August 2020 will introduce new image editing functions that will possibly break our Unsplash plugin functions.

We will need to determine how these changes will impact the plugin and prioritize the work needed to address this prior to that release.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

Previously in WP when you edited an image it did not create a new image. Now in 5.5, cropping creates a new attachment and generates the required image sizes (thumb, med, lrg), but does not copy over any of the original metadata (ALT, caption, description etc)

This presents an issue for Unsplash in that we need the auto-generated caption, and we break the identification of the image as an Unsplash image that requires hotlinking

The questions now are:

  1. Does editing (cropping) of the Unpslash image need to retain the hotlink and associated tracking
  2. If so, how do we copy the image meta to the new cropped image
  3. If so, how do we keep the tracking in place (tracking pixel)

Jonny's recco:

  1. When the image is cropped there is a hook that provides us with the new ID and the old ID. We could then add a flag to the new image that allows us (at some point in the future) to identify the unsplash images.
  2. If we agree to ignore the new hotlinked image, we should still duplicate the ALT text (and other meta) to the new image so that there is no loss in this data.

QA testing instructions

Demo

Changelog entry