Skip to content

Fixed broken preview for last optimized image#1063

Open
girishpanchal30 wants to merge 1 commit into
developmentfrom
bugfix/1054
Open

Fixed broken preview for last optimized image#1063
girishpanchal30 wants to merge 1 commit into
developmentfrom
bugfix/1054

Conversation

@girishpanchal30
Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

As we get the S3 resource ID capitalized, we need to convert it to lowercase.

Closes #1054

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@pirate-bot
Copy link
Copy Markdown
Collaborator

Plugin build for 287dbdf is ready 🛎️!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the broken “last optimized image” preview in the Optimole WP admin UI by normalizing the cloud/offload resource identifier coming from the stats API before generating the preview URL.

Changes:

  • Lowercase the key value returned by the optimized-images stats endpoint before passing it to get_media_optimized_url(), preventing mismatches when the ID is returned capitalized.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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