New answers tagged

2

Your attributes are added only when image class is set. If you want dimensions on all images, move the code outside of $item->menu_image_css check: if ($item->menu_image) { $image_attributes['height'] = '308'; $image_attributes['width'] = '308'; if ($item->menu_image_css) { $image_attributes['class'] = $item->...


Top 50 recent answers are included