Go to frontend, with breadcrumbs enabled, do an audit test with chrome. Then you see that the divider is missing a width and height tag.
No issue
Specify image dimensions (1)
A width and height should be specified for all images in order to speed up page display. The following image(s) are missing a width and/or height:
arrow.png
(2 uses)
We need to parse the height and width on the JHtml:_('image') side.
for example this code we use to show the width and height:
$location = JUri::root() . $attachment->getUrl();
$data = getimagesize($location);
$width = $data[0];
$height = $data[1];
<img src="<?php echo $attachment->getUrl(); ?>" width="<?php echo $width ;?>" height="<?php echo $height ;?>" alt="" />
This is needed for a w3c validation checks, or any other html checks like in the inspector from chrome (audit - ).
Now if you check a clean protostar template. he is showing a dimension notice to fix the height and width tag.
Category | ⇒ | Front End |
See #9919 for an example
Labels |
Added:
?
|
Category | Front End | ⇒ | Front End Libraries |
The image is so small, it doesn't really affect page rendering. But in case it is decided to add the dimensions, it should be done in template CSS.
I am closing this at this time. If code is provided (a pull request) it can always be re-examined.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-08 11:09:30 |
Closed_By | ⇒ | brianteeman |
I dont get that report in my chrome audit but thats not relevant
Your title says that its an issue with JHtml:_('image')
Why do you say that?
If you want to add dimensions using JHtml:_('image') you can do it as stated in the docblock and seen elsewhere in the core
All that is needed for mod_breadcrumbs is to add that array
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9919.