Skip to content

Conversation

@aatanasov-cloudinary
Copy link
Collaborator

Summary:

  • The styling of the Crop and Gravity feature was improved in this PR.
  • The save/usage functionality remains the same.
  • Also, the example images were changed to new ones.

Approach

  • Prepared the sizes to work like tabs.
  • Each size tab shows either the example images (admin.php?page=cloudinary_image_settings) or the actual asset (post.php?post=4513&action=edit).
  • The previous CSS and PHP code was adjusted.

QA notes

Global transformations:

  • Go to admin.php?page=cloudinary_image_settings and enable the Crop and Gravity feature.
  • Ensure the styling is correct.
  • Add some transformations to the sizes.
  • Check if the global transformations work using wp_get_attachment_image_src with an example synced asset.

Global transformations:

  • Go to the edit page of an asset, and enable the Crop and Gravity feature for it.
  • Add some transformations to the sizes.
  • Check if the size transformations work using wp_get_attachment_image_src.

Example test code:

echo '<img src="' . wp_get_attachment_image_src( 4513, 'thumbnail' )[0] . '" />';

Copy link
Collaborator

@gabrielcld2 gabrielcld2 left a comment

Choose a reason for hiding this comment

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

just a small typo, but otherwise this looks good and works as expected 👍


// Bind input events once
if ( ! input.bound ) {
let timout = null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: This variable has a typo: it should probably be named timeout instead of timout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants