So i think because im turning images and videos into virtual pages, by setting a template via a hook in the config on upload, but this happens after the file has been created. It is not respecting the image width set in the file blue print. I know the autorezie plugin works still but is now archived.
How can i do this with the native resziing on uploade?
my config looks like htis
'hooks' => [
'file.create:after' => function ($file) {
if ($file->parent()->template() == 'album') {
if ($file->type() == 'video') {
$file->update([
'template' => 'video'
]);
} elseif ($file->type() == 'image') {
if (!$file->template() == 'poster') {
$file->update([
'template' => 'shot'
]);
}
}
}
}
],