Skip to content

Conversation

@aatanasov-cloudinary
Copy link
Collaborator

@aatanasov-cloudinary aatanasov-cloudinary commented Jul 15, 2025

Fixes the following:

  • Syncing plugin (parent) assets when they have new versions.
  • Adding a version to the plugin assets to ensure no old cached assets are delivered.
  • Ensuring the icons from the Cloudinary font render correctly.

Approach

  • For the Cloudinary font, the css-unicode-loader package was installed to ensure such code isn't affected: content: "\e900";
  • For the parent syncing issue, the following has been done:
    • Set the version to the asset URL using the get_cloudinary_version method.
    • Added a new method called sync_parent to take care of syncing parent assets.

QA notes

  • Install a test plugin like this one: test-image-updated.zip. Please rename the plugin folder and the plugin name.
  • Go to Cloudinary General Settings and ensure the plugin is enabled for syncing: test-plugin-sync (note the disable asset settings don't work, this issue will be addressed in another PR).
  • Go to the admin page of the test plugin so Cloudinary syncs the plugin assets.
  • Wait for a minute, and the images should be delivered from Cloudinary. Something like that: https://res.cloudinary.com/example-account/images/w_500/v248/cloudinary.local/wp-content/plugins/test-image-updated/example1-test-image/example1-test-image.png?_i=AA -- -v248 is the version of the plugin: 2.48
  • Change one of the test images in the test plugin, but the file name must be the same.
  • Increase the test plugin version.
  • Go again to the admin page of the test plugin and wait for a few minutes.
  • After a few minutes, the new version of the image should be available, and the version in the image URL to be changed.
  • Ensure there are no debug errors.

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.

Changes look good. I was able to follow the testing steps locally and can confirm the issue is fixed ✅

@aatanasov-cloudinary aatanasov-cloudinary merged commit a6837f9 into develop Jul 17, 2025
4 checks passed
This was referenced Aug 6, 2025
@aatanasov-cloudinary aatanasov-cloudinary deleted the fix/plugin-assets-sync branch September 17, 2025 13:56
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