All notable changes to this project will be documented in this file.
- Fixed files not being deleted when media is trashed from the resource index view (thanks to @murad-optimist)
- Fixed deleting media in media browsing modal
- Updated packages
- Added WIP watermarking ability (thanks to @pitchayakit)
- Added ability to delete images (thanks to @pitchayakit)
- Added ability to stop thumbnail generation (thanks to @milewski)
- Slight refactoring
- Fixed Media Library modal showing both "Close" and "Back" buttons
- Updated packages
- Fixed base64 encoded file deduplication not working when using
createFromFile
method - Fixed ID field not displaying
- Media created from file or URL will now clean up the temporary file after media's been stored
- Fixed missing dependency on Guzzle
- Updated packages
- Media browsing modal can be now closed using "escape" key or clicking on backdrop
- Fixed overflow issue in media modal browser in file data area
- Fixed a console error when uploading image in media library index view
- Check for empty field value in
MediaField::resolveResponseValue
- if value is empty then return null
createFromData
is now deprecated inMediaHandler
, usecreateFromFile
method instead
Fixed small typo
- Added
quality
to media field config file that will be used when encoding thumbnails - Added initial index view field for media
- Added audio thumbnail for audio mime type
- Added document thumbnail for all mime types that are unmapped
- Added fallback image for image preview that has missing/broken source
- Fixed #31, where multiple() was no longer working due to duplicate declaration of computed
- Added collection parameter to
findFiles
request. - MediaController@findFiles will now properly use collection to search files.
- Media library index resource table view should display upload media button when table is empty and should open media browser modal upon clicking
- Storage driver default in nova media field config has been
changed from
config('filesystems.default')
toenv('MEDIA_LIBRARY_DRIVER', 'public')
Media
modelgetUrlAttribute
,getWebpUrlAttribute
andgetImageSizesAttribute
methods has been fixed by removing URL prefixing.- Run
php artisan migrate
to add the newfile_hash
column - Default filesystem driver for media field was changed in config file, please review
these settings as your images will have broken links upon upgrading, to fix them
run
php artisan media:strip-public-prefix-from-path
. This command will regenerate file path column.
Fixed 2 instances where config key was invalid when checking if duplication check is enabled.
This release should allow implementing mult-disk support if project requires it. All core logic should be overrideable.
-
New config option
nova-media-field.media_model
allows overriding original Media model. New model must be extended from the original. -
Local
getDisk
method for Media model to use.
Use getDisk
method in Media model for URL generators
Fixes exception when uploading from index view
Fixes paths for media rows because of breaking change introduced in v2. Replaces public/media/*
with media/*
.
- Command
media:strip-public-prefix-from-path
Run command php artisan media:strip-public-prefix-from-path
to fix media field "path" column values.
Adds a feature that checks for duplicate media entry by generating has based on first megabyte of file. This will not work on existing images
This update should allow using any file driver that is supported in Laravel.
- [Breaking change] Storage driver default in nova media field config has been changed from
config('filesystems.default')
toenv('MEDIA_LIBRARY_DRIVER', 'public')
- [Breaking change]
Media
modelgetUrlAttribute
,getWebpUrlAttribute
andgetImageSizesAttribute
methods has been fixed by removing URL prefixing.
MediaHandler
classcreateFrom...
methods has been updated to supportresolve_duplicates
. When finding a duplicate media item then these methods will return existing instance of that image instead.
- New
file_hash
column, will be used to store original file hash to check for duplicates resolve_duplicates
key to media field config file. If enabled it will not create a new entry when existing media item is found.
- run
php artisan migrate
to add the newfile_hash
column - default filesystem driver for media field was changed in config file, please review these settings
- Fixed #31, where multiple() was no longer working due to duplicate declaration of computed
- Updated packages
- Added collection parameter to
findFiles
request.- MediaController@findFiles will now properly use collection to search files.
- Fixed help text not being displayed
- Fixed Postgres support (thanks to @LINKeRxUA)
- Make thumbnail larger in media edit view
- Updated packages
- Fixed video thumbnail not showing in add media modal after upload
- Added video thumbnail generation support
- Updated packages
- Fixed case where uploading a file from the UI didn't work
- Added
createFromData
function that allows saving base64 encoded image
- Updated packages
- Stop image from being upsized when resizing
- Improve
resolveResponseValue
(thanks to @Artexis10)
- Improved error handling on upload failure in Vue
- Updated packages
- Make timeout configurable in
createFromUrl
- Changed default timeout to 60 seconds instead of 15
- Added
max_original_image_dimensions
configuration option that restricts original image size - Updated packages
- Added timeout to
createFromUrl
- Fixed MediaController crashing with invalid ids input
- Updated packages
- Added new
createFromUrl
function to MediaHandler
- Enforce thumbnails and always try to display thumbnails in the front-end
- Fixed case where
mimeType
was left totext/plain
- Updated packages
- Fixed webp url returning only folder path when webp_name was null
- Replaced
env()
usage withconfig()
(thanks to @KasparRosin) - Updated packages
- Fixed non-image (for example SVG) upload which was broken in 1.2.1
- Fixed uploaded
webp
image not saving original file aspng
, even though it was encoded as such
- Added ability to copy link to clipboard through click (thanks to Rafael Milewski)
- Added config option to overwrite the Media resource (thanks to Rafael Milewski)
- Fixed URL field not displaying (thanks to Rafael Milewski)
- Added ability to overwrite MediaHandler class (thanks to Rafael Milewski)
- Fixed issue with media not being queried on detail view
Initial public release.
- Fixed bug where a numeric value would not be queryable
- Updated packages
- Field UI when in compact mode + add default thumbnail size
- Media modal UI
- run
php artisan migrate
to add columns that are required for WebP
- Upload button on resource index page
- Search on upload index page
- WebP support
- Method to modify thumbnail sizes on nova admin
- Method to format Media model serialization
- UI changes in media library modal
- Selected files are now rendered at top when opening modal
- Upload Media button added to resource view that opens stripped media modal for file upload
- Custom formatter option for media model to decrease response size
- Media nav item from under nova resource navigation
- Custom resource view.
- Blade template for nova navigation
- Display resource view in Nova navigation
In your NovaServiceProvider
class add or update tools
method
use OptimistDigital\MediaField\NovaMediaLibrary;
public function tools()
{
return [
new \OptimistDigital\MediaField\NovaMediaLibrary,
];
}
- run
php artisan migrate
to add the new title field
- Pagination
- Title field
- Media edit modal