After saving Bread you get a Division by Zero Error from Intervention Plugin
Set Field Type to multiple image AND add options field like this:
{
"resize": {
"width": "1000",
"height": "null"
},
"quality": "70%",
"upsize": true,
"thumbnails": [
{
"name": "medium",
"scale": "50%"
},
{
"name": "small",
"scale": "25%"
},
{
"name": "cropped",
"crop": {
"width": "300",
"height": "250"
}
}
]
}
Shouldn't the Controller Part in row 225 be the same as for the single Image (check for NULL Value)?
Shouldn't the Controller Part in row 225 be the same as for the single Image (check for NULL Value)?
This question doesn't make any sense, as you haven't referenced any code or said what "row 225" is.
Oh, sorry, youre right. Here the code that I refer to:
voyager/src/Http/Controllers/Controller.php
Single Image Thumbnail creation checks resize width/height also as null-String, multiple not.
/* SINGLE MAGE*
if ($thumb_resize_width != null && $thumb_resize_width != 'null') {
$thumb_resize_width = intval($thumb_resize_width * $scale);
}if ($thumb_resize_height != null && $thumb_resize_height != 'null') {
$thumb_resize_height = intval($thumb_resize_height * $scale);
}/* MULTIPLE */
if ($thumb_resize_width != null ) {
$thumb_resize_width = intval($thumb_resize_width * $scale);
}
if ($thumb_resize_height != null) {
$thumb_resize_height = intval($thumb_resize_height * $scale);
}
Maybe it's something related to that "height": "null" part. Try removing the quotes around the value.
Agreed, the quotes definitely shouldn't be there. I feel like someone "fixed" the single image code so it will handle the quoted null value instead of fixing the quoted null value.
@Banquo1 do you still encounter this issue?
This has gone unreported by anyone else for 6 months now, so I think it got fixed, though I can't state where exactly. If this is still an problem, please open a new issue with updated information.
Maybe it's something related to that
"height": "null"part. Try removing the quotes around the value.
Absolutely. Worked for me. Thanks.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
This has gone unreported by anyone else for 6 months now, so I think it got fixed, though I can't state where exactly. If this is still an problem, please open a new issue with updated information.