Skip to content

get edited asset URL from PHP; stop adding timestamp - #598

Merged
brandonkelly merged 6 commits into
5.xfrom
bugfix/595-image-editor-asset-url
Aug 10, 2026
Merged

get edited asset URL from PHP; stop adding timestamp#598
brandonkelly merged 6 commits into
5.xfrom
bugfix/595-image-editor-asset-url

Conversation

@i-just

@i-just i-just commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Changes in this PR:

  • when editing an image without a transform, call CkeditorController::actionImageUrl() so that events can do their thing and so that GeneralConfig::revAssetUrls is respected.
  • when editing an image with a transform, the request goes through Assets::generateTransform(), which should ensure the correct URL is returned
  • only add timestamp to the URL if revAssetUrls is set to false (the default), as in that case we need something to indicate that the image should be reloaded, even if the URL is the same

The regex in _srcInfo() was greedy because the query string can be a part of the asset’s URL. This is the case, e.g. when using Servd’s Assets and Helpers plugin. That’s why I’m leaving it as is.

Related issues

#595
#477

@brandonkelly
brandonkelly marked this pull request as ready for review August 10, 2026 17:37
@brandonkelly
brandonkelly self-requested a review as a code owner August 10, 2026 17:37
@brandonkelly
brandonkelly merged commit 9a11e47 into 5.x Aug 10, 2026
6 checks passed
@brandonkelly
brandonkelly deleted the bugfix/595-image-editor-asset-url branch August 10, 2026 17:38
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.

2 participants