Opened 15 years ago
Closed 9 years ago
#12134 closed enhancement (wontfix)
Add image dimensions to smiley img element
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Formatting | Keywords: | |
Focuses: | Cc: |
Description
All smileys are 15x15. Add dimensions to the img element to avoid a double paint by web browsers during page load.
Attachments (1)
Change History (10)
#1
@
15 years ago
- Keywords reporter-feedback added
Why would this be useful, again?
Can't you set the width through CSS?
#2
@
15 years ago
- Keywords needs-patch added; has-patch removed
Since the smiley URL passes through a filter, a theme can implement their own, and those may not be 15 x 15.
By specifying image dimensions in HTML, you prevent the browser from reflowing and repainting once the images are loaded.
For reference, here's a quick write-up on it from Page Speed:
http://code.google.com/speed/page-speed/docs/rendering.html#SpecifyImageDimensions
#7
@
14 years ago
- Keywords dev-feedback added; needs-patch removed
Could we add a filter for the image dimensions?
$dims = apply_filters( 'smiley_dimensions', array( 15, 15 ) ); return " <img src='$srcurl' alt='$smiley_masked' class='wp-smiley' width='{$dims[0]}' height='{$dims[1]}' /> ";
#8
@
11 years ago
It would make sense to offer a filter that does nothing by default. I think that would be the most useful way for theme developers to modify smilies output.
#9
@
9 years ago
- Keywords dev-feedback removed
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from reviewing to closed
Given smilies are now hidden by default in [32454] as of 4.3, adding more features to a feature that is now hidden by default on new installs doesn't seem to follow the decisions for the majority philosophy.
img width and height for smileys