Releases: mindkomm/timmy
Releases · mindkomm/timmy
v2.1.1
v2.1.0
v2.0.1
v2.0.0
2.0.0 (2024-05-08)
⚠ BREAKING CHANGES
- Remove
Timmy::VERSION
constant - Add compatibility with Timber 2.0
Features
Full Changelog: v1.1.0...v2.0.0
v1.1.0
1.0.0
Timmy version 1 comes packed with new features and introduces some breaking changes.
- Fixed a bug when Timmy tried to resize files that it shouldn’t (video files for example).
- Fixed issue when Timmy created upscaled image files even though it shouldn’t.
- Added support for lazy loading with
loading
attribute. - Added
width
andheight
attributes for images by default to support browsers to calculate an aspect ratio. - Added support for WebP images.
- Added support for getting Timmy image sizes with
wp_get_attachment_image_src()
. - Added
get_timber_image_alt()
function. - Added
get_timber_image_caption()
function. - Added
get_timber_image_description()
function. - Added
get_timber_picture_responsive()
function. - Added
get_timber_picture_fallback_image()
function. - Added better support for SVG images. They will also receive
width
andheight
attributes if a size can be read from the SVG file. - Increased minimum supported PHP version to 7.4.
- Increased required Timber version to 1.9.
- Changed oversize configuration option naming from
oversize
toupscale
. You can still useoversize
, but it will be deprecated in the future. - Improved hints about controlling image sizes for Yoast.
Breaking changes
- Changed additional parameters that are passed to the
timber/src_default
filter. There is no longer an array of additional$attributes
to this filter, but only an instance ofTimmy\Image
. - Removed function pluggability. This means that you can’t overwrite any Timber functions anymore. If you want a similar functionality, you can copy the functions. They have way less logic in them than before, because a lot of the logic moved to the
Timmy\Image
class. - Removed
get_post_thumbnail()
andget_post_thumbnail_src()
functions, because they are not namespaced with_timber_
as the other functions and are practically the same asget_timber_image()
andget_timber_image_src()
. - Removed the
title
attribute from the<img>
attributes, which was added by default with an image’s description. That approach was too opinionated and might only make sense in some use cases. If you still want to somehow use the image description, you can use theget_timber_image_description()
function. - Removed deprecated
get_image_attr_html()
,get_timber_image_attr()
andget_acf_image_attr()
functions.
Changed how Timmy should be initialized.
🚫 Before
new Timmy\Timmy();
✅ After
Timmy\Timmy::init();
Changed how Responsive Content Images should be initialized
🚫 Before
new Timmy\Responsive_Content_Images()
✅ After
Timmy\Timmy::responsive_content_images();
New API behind the scenes
- Added a new
Timmy\Image
class that is used to generate the markup for an image. Most of the functionality that was in theget_timber_*()
functions before now lives in that class. - Added a
Timmy\Timmy::get_image()
function to get aTimmy\Image
in a way that allows developers to extend theTimmy\Image
class.
New documentation
What changed since the 1.0.0-beta.3 release
- Fixed a bug when Timmy tries to resize files that it shouldn’t by @gchtr in #45
- Fixed a typo in README.md by @hanifbirgani in #42
- Updated testing setup by @gchtr in #52
- 1.x Fix bugs for images without metadata by @gchtr in #53
- 1.x Allow
lazy_*
args for picture markup by @gchtr in #54 - 1.x Add an API for image version for dark color schemes by @gchtr in #55
- 1.x Improve handling of full size images by @gchtr in #56
- 1.x Fix a bug when Gif images were converted to WebP images by @gchtr in #57
- 1.x Fix some bugs where Timmy resized images unnecessarily by @gchtr in #58
- 1.x Add responsive_src() and responsive() methods by @gchtr in #59
Full Changelog
1.0.0-beta.3
1.0.0-beta.2
- Fixed bugs
- Added
Timmy\Timmy::VERSION
constant. - Added a note about WordPress’ behavior to add loading attributes. See Disable lazy loading in docs.
- Updated default WebP quality from
100
to80
, because otherwise the WebP image might grow bigger than the original image. See Docs.
0.14.9
- Added
Timmy\Timmy::VERSION
constant. You can use this to check Timmy’s version usingversion_compare()
as soon as the upcoming new major version 1.0.0 is released:if ( version_compare( Timmy\Timmy::VERSION, '1.0.0', '<' ) ) { // Do something for Timmy versions < 1.0.0. }
- Fixed a bug when Timmy tries to resize files that it shouldn’t, like video files. See #45.
- Updated testing suite.
- Updated
composer/installers
Composer dependency to allow versions^1.0
and^2.0
.
1.0.0-beta.1
This version comes packed with new features and introduces some breaking changes.
- Fixed a bug when Timmy tried to resize files that it shouldn’t (video files for example).
- Fixed issue when Timmy created upscaled image files even though it shouldn’t.
- Added support for lazy loading with
loading
attribute. - Added
width
andheight
attributes for images by default to support browsers to calculate an aspect ratio. - Added support for WebP images.
- Added support for getting Timmy image sizes with
wp_get_attachment_image_src()
. - Added
get_timber_image_alt()
function. - Added
get_timber_image_caption()
function. - Added
get_timber_image_description()
function. - Added
get_timber_picture_responsive()
function. - Added
get_timber_picture_fallback_image()
function. - Added better support for SVG images. They will also receive
width
andheight
attributes if a size can be read from the SVG file. - Increased minimum supported PHP version to 7.4.
- Increased required Timber version to 1.9.
- Changed oversize configuration option naming from
oversize
toupscale
. You can still useoversize
, but it will be deprecated in the future. - Improved hints about controlling image sizes for Yoast.
Breaking changes
- Changed additional parameters that are passed to the
timber/src_default
filter. There is no longer an array of additional$attributes
to this filter, but only an instance ofTimmy\Image
. - Removed function pluggability. This means that you can’t overwrite any Timber functions anymore. If you want a similar functionality, you can copy the functions. They have way less logic in them than before, because a lot of the logic moved to the
Timmy\Image
class. - Removed
get_post_thumbnail()
andget_post_thumbnail_src()
functions, because they are not namespaced with_timber_
as the other functions and are practically the same asget_timber_image()
andget_timber_image_src()
. - Removed the
title
attribute from the<img>
attributes, which was added by default with an image’s description. That approach was too opinionated and might only make sense in some use cases. If you still want to somehow use the image description, you can use theget_timber_image_description()
function. - Removed deprecated
get_image_attr_html()
,get_timber_image_attr()
andget_acf_image_attr()
functions.
Changed how Timmy should be initialized.
🚫 Before
new Timmy\Timmy();
✅ After
Timmy\Timmy::init();
Changed how Responsive Content Images should be initialized
🚫 Before
new Timmy\Responsive_Content_Images()
✅ After
Timmy\Timmy::responsive_content_images();
New API behind the scenes
- Added a new
Timmy\Image
class that is used to generate the markup for an image. Most of the functionality that was in theget_timber_*()
functions before now lives in that class. - Added a
Timmy\Timmy::get_image()
function to get aTimmy\Image
in a way that allows developers to extend theTimmy\Image
class.