You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey y'all, I just want to shoutout the Flynt team, this has been a terrific platform to build with, but yesterday I hit a snag. This is meant to share my findings.
Recently I upgraded Timber 2.1 to 2.3. Shortly after that I noticed all the image-based components I was building were not showing their images.
resizeDynamic was a custom Flynt wrapper around Timber's image resizing
It relied on ImageHelper::resize() which was deprecated in Timber 2.0+
Timber's native |resize() filter is the official, supported method in Timber 2.x
The native approach is reliable, and will be maintained
I was wondering if anyone else might have stumbled across this. I documented these migration steps for myself and will share them here.
The Readme docs for the current version of FlyntWP appears to document resizeDynamic() wrapper. Please consider moving to this alternative method.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey y'all, I just want to shoutout the Flynt team, this has been a terrific platform to build with, but yesterday I hit a snag. This is meant to share my findings.
Recently I upgraded Timber 2.1 to 2.3. Shortly after that I noticed all the image-based components I was building were not showing their images.
resizeDynamicwas a custom Flynt wrapper around Timber's image resizingImageHelper::resize()which was deprecated in Timber 2.0+|resize()filter is the official, supported method in Timber 2.xI was wondering if anyone else might have stumbled across this. I documented these migration steps for myself and will share them here.
The Readme docs for the current version of FlyntWP appears to document
resizeDynamic()wrapper. Please consider moving to this alternative method.Migration Steps
1. Basic Image Resize
Before:
{{ post.thumbnail.src|resizeDynamic(768, 512) }}After:
{{ post.thumbnail.src|resize(768, 512) }}2. With Crop Position
Before:
{{ image.src|resizeDynamic(1920, 1080, 'center') }}After:
{{ image.src|resize(1920, 1080, 'center') }}3. Responsive Srcsets
Before:
After:
4. Using Timber's Built-in Srcset (Recommended)
For even better performance, let Timber generate the srcset automatically:
WordPress Method vs Timber Method
❌ WordPress Hybrid (Avoid)
Issues:
✅ Pure Timber (Recommended)
Benefits:
Filter Parameters
Both filters accept the same parameters:
Examples
Quick Reference Card
|resizeDynamic(1920)|resize(1920)|resizeDynamic(1920, 1080)|resize(1920, 1080)|resizeDynamic(1920, 1080, 'center')|resize(1920, 1080, 'center')wp_get_attachment_image_srcset(){{ image.srcset }}Additional Resources
Beta Was this translation helpful? Give feedback.
All reactions