diff --git a/Aeria/Field/Fields/MediaField.php b/Aeria/Field/Fields/MediaField.php index 5afbf20..3645e58 100644 --- a/Aeria/Field/Fields/MediaField.php +++ b/Aeria/Field/Fields/MediaField.php @@ -43,7 +43,9 @@ public function get(array $saved_fields, bool $skip_filter = false) } foreach ($sizes as $size) { $result[$size] = wp_get_attachment_image_src($value, $size); - $result[$size][3] = $result[$size][2] / $result[$size][1]; + if ($result[$size][2] && $result[$size][1]) { + $result[$size][3] = $result[$size][2] / $result[$size][1]; + } } } else { $result['full'] = [wp_get_attachment_url($value)];