All notable changes to statamic-responsive-images
will be documented in this file
- Fail silently on asset exceptions when processing data for fieldtype index (entry lists, tables), fixes #231 by @ncla in spatie#235
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v4.1.0...v4.1.1
- Accept
width
param from GraphQL arguments for dimension calculations; fixes #233 by @ncla in spatie#234 - Add
glide_width
as possible argument for GraphQLresponsive
field
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v4.0.3...v4.1.0
- Fix
sometimes
validation not working when hiding responsive field by @ncla in spatie#229
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v4.0.2...v4.0.3
- Handle empty src in GraphQL ResponsiveFieldType for fresh collections by @ncla in spatie#226
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v4.0.1...v4.0.2
- Allow extending calculation methods in the
ResponsiveDimensionCalculator
by @ncla in spatie#225
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v4.0.0...v4.0.1
- Statamic v4 support by @bengs @ncla in spatie#221
- Asset fieldtype styles within Responsive field have been adjusted for narrow spaces
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v3.1.3...v4.0.0
- Rethrow
Unable to read file
exception for placeholder generation in SSG context by @ncla in spatie#209. Developers must be aware of failed placeholder generation when running SSG due to a SSG bug. Workaround and discussion about it can be found here, alternatively just disable placeholder generation.
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v3.1.2...v3.1.3
- GraphQL: let responsive field/fieldtype fail more gracefully when default breakpoint asset has not been found by @ncla in spatie#208
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v3.1.1...v3.1.2
- Fix
AssetUploaded
listenerGenerateResponsiveVersions
erroring out due to outdated code,Breakpoint
no longer dispatches jobs by @ncla in spatie#207 - Fix
AssetUploaded
listenerGenerateResponsiveVersions
firing off twice due to mistakenly booting events twice inServiceProvider
by @ncla in spatie#207
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v3.1.0...v3.1.1
GraphQL improvements by @ncla in spatie#203
- Support way more arguments in responsive field, add all of them for each breakpoint
- Accept fieldtype data into GraphQL responsive field
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v3.0.0...v3.1.0
This is a breaking change release, as such please see UPGRADE.md for instructions on how to upgrade from 2.x version to 3.x.
- Extensible dimension calculators by @ncla in spatie#193
-
- Developers now can customize the amount of images that get generated and their exact dimensions through a custom
DimensionCalculator
that developers bind inServiceProvider
. Calculations can be done for each breakpoint and source, and receiveBreakpoint
/Source
in the calculation methods, which allows to access breakpoint parameters, original asset and more. For motivation and examples of this, please see the PR and the original issue associated with it.
- Developers now can customize the amount of images that get generated and their exact dimensions through a custom
- Fix max widths config value or glide width param not being respected in some cases
- Fix floating numbers being output for width and height values for Glide endpoint, they are now rounded integers
- Placeholder now can be toggled per breakpoint
<img>
tag src will now go through Glide instead of pointing to the original asset file, due toDimensionCalculators
ability to return specific widths and heights for<img>
tag- Empty
media
attributes will no longer be outputted - Properties have been renamed to be more descriptive:
-
value
tominWidth
-
unit
towidthUnit
- Add
mimeType
property to explicitly help browsers determine what images does the<source>
contain - Housekeeping: add additional tests for dimension calculator and GraphQL
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.15.2...v3.0.0
- Fix broken thumbnails on control panel entry index pages on Statamic v3.4 by @ncla in spatie#201
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.15.1...v2.15.2
- Fix ResponsiveFieldtype erroring out in Replicator sets due to PublishContainer by @ncla in spatie#192
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.15.0...v2.15.1
- Add config option to force absolute URLs on Glide URLs by @SteJW in spatie#190
- @SteJW made their first contribution in spatie#190
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.14.5...v2.15.0
- Placeholder generation now fails silently on production by logging exceptions if
APP_DEBUG
isfalse
by @heidkaemper in spatie#189 - Refactor tests to Pest by @alexmanase in spatie#183
- @alexmanase made their first contribution in spatie#183
- @heidkaemper made their first contribution in spatie#189
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.14.4...v2.14.5
- Force
<img>
tag width & height parameters to an integer by @micahhenshaw in spatie#180
- @micahhenshaw made their first contribution in spatie#180
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.14.3...v2.14.4
- Control panel JS assets have been compiled for distribution with missing fixes from spatie#156
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.14.2...v2.14.3
- Fix placeholder generation failing when changing
assets.image_manipulation.cache
value by @ncla in spatie#174
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.14.1...v2.14.2
- Fix
avif
attribute being output to<img>
tag by @ncla in spatie#170 - Fix
src
saving as an array when it should be a string by @ncla in spatie#173
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.14.0...v2.14.1
- Add asset reference updating for Repsonsive fieldtype by @stuartcusackie @ncla in spatie#149
- Fix required validation for default breakpoint by @ncla in spatie#164
- @stuartcusackie made their first contribution in spatie#149
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.13.1...v2.14.0
- Prevent float to int conversion warning by @kevinmeijer97 in spatie#151
- Fix fieldtype Vue component issues by @ncla in spatie#156
- @kevinmeijer97 made their first contribution in spatie#151
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.13.0...v2.13.1
- Explicitly define crop focus by @ncla in spatie#145
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.12.4...v2.13.0
- Try another fix for alt tags
- The responsive blade directive can now handle augmented fieldtype data (array)
- Fix an exception with
OrderedQueryBuilder
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.12.3...v2.12.4
- Fix
method_exists
exception by @aerni in spatie#136
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.12.2...v2.12.3
- Add fix for issue #133 by @GertTimmerman in spatie#135
- @GertTimmerman made their first contribution in spatie#135
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.12.1...v2.12.2
- Fix an issue where images could get upscaled #134
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.12.0...v2.12.1
- AVIF images and quality settings by @ncla in spatie#123
- Use asset data alt tag and fallback to title - fix #74
- Max width now counts as max width for the source image as well - fix #114
- Asset param can be a query builder - fix #116
- @ncla made their first contribution in spatie#123
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.11.2...v2.12.0
- Use setValue instead of fillValue by @hgrimelid in spatie#122
- @hgrimelid made their first contribution in spatie#122
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.11.1...v2.11.2
- prevent getFieldsWithValues error by @yipeecaiey in spatie#117
- Use computed name property to avoid conflicts with replicator by @quintenbuis in spatie#119
- @yipeecaiey made their first contribution in spatie#117
- @quintenbuis made their first contribution in spatie#119
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.11.0...v2.11.1
- Fix Statamic 3.3 support
- Drop support for 3.2 and 3.1
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.10.1...v2.11.0
- Fix the fieldtype not saving values correctly
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.10.0...v2.10.1
- Add support for Statamic 3.3
- Drop support for Statamic 3.1
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.9.3...v2.10.0
- Fix PHP 7.4 compatibility
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.9.2...v2.9.3
- Fix default breakpoint ratio not working
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.9.1...v2.9.2
- Fix an issue with asset height not being calculated correctly
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.9.0...v2.9.1
- Test against php 8.1 by @sergiy-petrov in spatie#100
- Fix spatie#105 - Don't inherit ratio
- Fix spatie#59 - Add asset validation
- Fix spatie#81 - Add index fieldtype display
- Fix duplicate alt tag issue - fix spatie#104
- Use the first assetContainer if none is set
- Try a different resize observer technique
- @sergiy-petrov made their first contribution in spatie#100
Full Changelog: https://github.com/spatie/statamic-responsive-images/compare/v2.8.5...v2.9.0
- Fix images not rendering (#99)
- Return of the missing "default" breakpoint
- Fix an issue where an undefined breakpoint could occur (#95)
- Only require the first image if the field config contains required validation (#97)
- Fix an issue when localizable isn't set in the blueprint
- Fix the field not being localizable
- Allow Statamic 3.2
- We now throw our own exception with more information when a corrupt image is being handled (#71)
- Added GraphQL support (docs)
- We now use ResizeObserver instead of an inline script to set the sizes attribute on the images
- Prevent the fieldtype from generating too many breakpoints (#66)
- Assets can be retrieved from an augmented asset's array values
- Fixed an issue when using the fieldtype inside a replicator or Bard set - #51
- Fixed an issue with invalid asset exception - #58
- Fixed an issue where the placeholder ratio was not always correct
- Fixed an issue with images not being output
- Wrapped the components in Statamic.booting to prevent loading issues
- Reworked how assets are generated on upload & with the command which should result in them being used again instead of regenerating when visiting the page.
- Added a config option to disable image generation on upload
- Cache placeholder generation
- The breakpoint no longer forces a relative URL
- Fix config registration
- Fix assets not being published
- The generate image job is now configurable
- The
placeholder
is now available in the view - The global config now contains global
webp
andplaceholder
config settings
- Gifs are now treated the same as SVGs, they don't generate variants
- Fixed the Blade directive
- Fixed an issue where passing a
null
ratio would break
- Added a fieldtype that allows full art direction.
- [new] Responsive images now supports true Art direction with the possibility to add a different
src
for each breakpoint.
- [fix] Fix the order of picture sources
- The
\Spatie\ResponsiveImages\Responsive
class has been renamed to\Spatie\ResponsiveImages\ResponsiveTag
- The views have been changed to Blade views instead of Antlers views.
- [new] Added the possibility for Art Direction [#32]
- [new] Added a config option for a global max width on generated images
- [fix] The max width parameter now generates an image correctly when only 1 size was calculated [#27]
- [new] Allow non-integer ratios
- [new] Added a
Responsive::render()
function - [new] Added a
@responsive
Blade directive - [new] You can now pass an asset url as parameter instead of needing to pass an asset object
- [fix] Register the command
- [new] Adds a
generate
command to generate responsive images without clearing the glide cache
- [new] Share the
asset
data with the views
- [fix] Improve exception handling in command
- [fix] Fix an issue with small images
- [fix] Make sure the placeholder respects the image ratio
- [new] Added GenerateImageJob queue specification via config
- [fix] Fix publishing & loading of the views
- [fix] Fix compatibility with latest Statamic Beta
- [fix] Fix a bug where webp images weren't being shown
- [new] Responsive tag now accepts a
ratio
parameter - [new] Glide parameters are passed through using a
glide:
prefix
- [new] Now generates responsive versions after asset upload
- [new] Added a command to regenerate responsive image versions
- initial release