You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the new Thumbnails utility for getting the folders there are 2 problems:
the folders are listed multiple times
when you include the source folder, only the source folders gets returned, the other folders are not listed
Steps to reproduce
Execute the code: BackendModel::get(Thumbnails::class)->getFolders(<IMAGE_PATH>, true);
Solution
I have changed the function, but probably there is more optimalisation possible. To fix the doubles the Finder utility needs to be reinitialized.
To add the source folder I have added a second condition.
Feel free to adjust and make it 100% correct.
`public function getFolders(string $inPath, bool $includeSourceFolder = false): array
{
if (!$this->filesystem->exists($inPath)) {
return [];
}
Actually, lately we've been using imagine filter functionality instead of the 'pregenerating' thumbnails. It all depends on what you need of course but I suggest looking into imagine filters, it's fully compatible with Fork.
@StijnVrolijk
Yes, I have seen the imagine filters in the medialibrary module for example.
So the "old" way of generating thumbnails will dissapear and is no longer supported?
Type
Critical bug
Problem description
When using the new Thumbnails utility for getting the folders there are 2 problems:
Steps to reproduce
Execute the code:
BackendModel::get(Thumbnails::class)->getFolders(<IMAGE_PATH>, true);
Solution
I have changed the function, but probably there is more optimalisation possible. To fix the doubles the Finder utility needs to be reinitialized.
To add the source folder I have added a second condition.
Feel free to adjust and make it 100% correct.
`public function getFolders(string $inPath, bool $includeSourceFolder = false): array
{
if (!$this->filesystem->exists($inPath)) {
return [];
}
`
The text was updated successfully, but these errors were encountered: