Does anyone know why the isResizable()
method is triggered on an SVG? A SVG should not be changeable or should it? Current case from GitHub:
isResizable()
only checks if the given file has one of these extensions
$resizable = [
'jpg',
'jpeg',
'gif',
'png',
'webp'
];
Anything else should return false
.
I’d say the problematic line is this one:
$excluded = in_array( $file->page()->intendedTemplate(), $excludeTemplates ) || in_array( $file->page()->uid(), $excludePages );
$file->page()
returns false
if you upload to the site object, so the call on intendedTemplate()
in that case is on false.
Thanks, I am aware of the error with $site. But what makes no sense for me is that the isResizeable() function contains a SVG that is not resizable. I’ll open a case on GitHub. Thanks
The problem would be rather with the $this->extension()
method which returns the wrong value, for whatever reason.
1 Like
You are right! Just tested with SVGs too and for me the SVGs work too and give me a false. There must be something wrong with the file!