All Notable changes to AssetLibrary
will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
- Added: option to retrieve only original conversion via:
Asset::getGeneratedConversions('original')
andAsset:getUrlsByConversionWidth('original')
.
- Added:
Asset::getGeneratedConversions()
returns array of all successful conversion names. - Added:
Asset:getUrlsByConversionWidth()
returns successfully converted urls and their conversion width.
- Added: second parameter to createAsset->save() method. This allows to set a custom asset type.
- Changed: update mediagallery package to 10 and add support for Laravel 10
- Added: it is now possible to manage data per asset or per associated pivot record.
- Added: You can now define additional formats in which the asset should be converted.
- Changed: (Breaking) Rename
Thinktomorrow\AssetLibrary\AssetTrait
toThinktomorrow\AssetLibrary\InteractsWithAssets
. - Changed: Following methods are deprecated: Asset::filename(), Asset::url() and Asset::hasFile(). Use Asset::getFileName(), Asset::getUrl() and Asset::exists() instead.
- Fix: Detaching single asset when entity id is uuid
- Fix: detaching asset with entity id being uuid fails
- added: extra params to AddAsset and AssetUploader to allow to set custom collection and disk on the media record.
- changed image dimensions calculations and added getWidth and getHeight functions to asset.
- fixed asset deletion
- add support for laravel 7
- add isused and is unused functions on asset as a shortcut to know if this asset is linked to a model.
- Assetuploader base64 now requires a filename. if uploaded through addAsset a random default is chosen as filename.
- Replace asset now also takes type and locale to make sure we only replace the asset we want.
- SortAsset now also take locale and the parameters have been swapped in order.
- Added checks for invalid parameters to assetuploader
- Replace asset now also takes type and locale to make sure we only replace the asset we want. These will be required in the next major version 0.7.0
- the same asset can now be uploaded to a model multiple times.
- detach asset now requires type and locale so we dont remove the asset for other types/locales
- the same asset can now be uploaded to a model for different types or locales
- provided fallback for getDimensions if there is no dimensions data
- Manipulation of assets now happens on the newly added commands: AddAsset, DeleteAsset, DetachAsset, SortAsset, ReplaceAsset
- Added HasAsset interface to replace the HasMedia interface on the models.
- added imagemigrate command
- Moved asset and assettrait to root folder
- Moved Assetuploader to Application folder
- Refactored the public api
- Assettrait is now only used for accessing assets and no longer for manipulation of assets
- Docs updated
- The addFile and addFiles method on the assetTrait now return the added assets.
- Filenames will now be slugified to avoid weird behaviour when accessing the files throught urls.