By pancho on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
12.0.x
Introduced in version:
12.0.0
Issue links:
Description:
The cache_bypass variable in image-style-preview.html.twig is deprecated in Drupal 12.0.0 and will be removed in Drupal 13.0.0. Instead use the derivative.url_uncached variable.
Previously, themers had to construct the derivative image URL with a cache bypass token. This could result in malformed URLs if the original URL already contained a query string or a fragment.
Instead, the preprocess function now provides the complete URL, including cache bypass and image style tokens, as derivative.url_uncached.
- Before:
<a href="{{ derivative.url }}?{{ cache_bypass }}">- After:
<a href="{{ derivative.url_uncached }}">
The derivative.url variable without a cache bypass token remains available and unchanged.
Impacts:
Themers