In this case $thumbnail_names array will contain names "resize-max", "resize-medium", "resize-small"
If I upload file "example.jpg", three thumbnails will be automatically generated
example-resize-max.jpg
example-resize-medium.jpg
example-resize-small.jpg
But none of them will return true in thumbnail condition
Str::endsWith($item['path'], $thumbnail_names)
Because $item['path'] contains image path with file extention.
"model/example-resize-max.jpg" does't end with "resize-max". It ends with "resize-max.jpg"
Steps to reproduce
Any Media Picker field with thumbnails. Option "hide_thumbnails" is true by default.
Expected behavior
Thumbnails must be hidden from Media Picker file list if "hide_thumbnails" is set to "true".
Laravel version
9.36.4
PHP version
8.1
Voyager version
1.6.0
Database
MySQL 5.7
Description
In VoyagerMediaController there is a condition that checks if file is a thumbnail.
But it doesn't work. Let's say my options for Media Picker field look like this
In this case $thumbnail_names array will contain names "resize-max", "resize-medium", "resize-small"
If I upload file "example.jpg", three thumbnails will be automatically generated
But none of them will return true in thumbnail condition
Str::endsWith($item['path'], $thumbnail_names)
Because $item['path'] contains image path with file extention. "model/example-resize-max.jpg" does't end with "resize-max". It ends with "resize-max.jpg"
Steps to reproduce
Any Media Picker field with thumbnails. Option "hide_thumbnails" is true by default.
Expected behavior
Thumbnails must be hidden from Media Picker file list if "hide_thumbnails" is set to "true".
Screenshots
No response
Additional context
No response