Skip to content

Releases: mindkomm/timmy

v2.0.0

08 May 07:22
a16968c
Compare
Choose a tag to compare

2.0.0 (2024-05-08)

⚠ BREAKING CHANGES

  • Remove Timmy::VERSION constant
  • Add compatibility with Timber 2.0

Features

  • Add compatibility with Timber 2.0 (1687f3f)
  • Remove Timmy::VERSION constant (031548b)

Full Changelog: v1.1.0...v2.0.0

v1.1.0

26 Mar 16:03
32f468a
Compare
Choose a tag to compare

1.1.0 (2024-03-26)

Features

  • Optimize filter priority for deleting and generating image sizes (#74)

Bug Fixes

  • Always export composer.json (142efa9)
  • Fix a PHP 8.1 deprecation (cbce1f2)

1.0.0

06 Apr 08:54
Compare
Choose a tag to compare

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 and height 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 and height 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 to upscale. You can still use oversize, 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 of Timmy\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() and get_post_thumbnail_src() functions, because they are not namespaced with _timber_ as the other functions and are practically the same as get_timber_image() and get_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 the get_timber_image_description() function.
  • Removed deprecated get_image_attr_html(), get_timber_image_attr() and get_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 the get_timber_*() functions before now lives in that class.
  • Added a Timmy\Timmy::get_image() function to get a Timmy\Image in a way that allows developers to extend the Timmy\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

0.14.8...1.0.0

1.0.0-beta.3

09 Jan 07:44
57ec97c
Compare
Choose a tag to compare
1.0.0-beta.3 Pre-release
Pre-release
  • Fixed a bug when Timmy unexpectedly generated WebP metadata
  • Fixed bugs for images without metadata by @gchtr in #53
  • Allowed lazy_* args for picture markup by @gchtr in #54
  • Updated testing setup by @gchtr in #52

Full Changelog: 1.0.0-beta.2...1.0.0-beta.3

1.0.0-beta.2

03 Mar 10:49
Compare
Choose a tag to compare
1.0.0-beta.2 Pre-release
Pre-release
  • 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 to 80, because otherwise the WebP image might grow bigger than the original image. See Docs.

0.14.9

01 Mar 15:53
Compare
Choose a tag to compare
  • Added Timmy\Timmy::VERSION constant. You can use this to check Timmy’s version using version_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

22 Feb 07:23
Compare
Choose a tag to compare
1.0.0-beta.1 Pre-release
Pre-release

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 and height 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 and height 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 to upscale. You can still use oversize, 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 of Timmy\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() and get_post_thumbnail_src() functions, because they are not namespaced with _timber_ as the other functions and are practically the same as get_timber_image() and get_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 the get_timber_image_description() function.
  • Removed deprecated get_image_attr_html(), get_timber_image_attr() and get_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 the get_timber_*() functions before now lives in that class.
  • Added a Timmy\Timmy::get_image() function to get a Timmy\Image in a way that allows developers to extend the Timmy\Image class.

New documentation

0.14.8

28 Jul 20:19
Compare
Choose a tag to compare
  • Fixed more issues with regex for Responsive Content Images.

0.14.7

01 Jul 19:25
Compare
Choose a tag to compare
  • Fixed regex for Responsive Content Images.
  • Fixed a bug for attachments that were deleted from the media library.

0.14.6

30 Mar 06:30
Compare
Choose a tag to compare
  • Added content_filters argument for Responsive Content Images constructor.
  • Fixed an internal performance issue with wp_check_filetype() when a lot of image data is requested.