Opened 10 years ago
Closed 10 years ago
#11844 closed defect (worksforme)
WikiFormatting for Image should include image dimensions
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | web frontend | Version: | 1.0.1 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When an image is inserted in Trac using [[Image()]]
macro, the HTML output should contain width
and height
attributes.
Currently these attributes are missing which causes anchors to be useless on pages with images especially when there is several of big ones. The browser usually doesn't compute the position of the anchor correctly and so it doesn't perform scrolling as required, but less.
Experienced in Firefox 33 using comment links in ticket with large number of images in comments.
Attachments (0)
Change History (3)
comment:1 by , 10 years ago
Milestone: | → next-stable-1.0.x |
---|
comment:2 by , 10 years ago
You can specify width
and height
parameters in the [[Image()]]
macro, e.g. the image has width
and height
attributes in the HTML output from these macro parameters: [[Image(htdocs:../common/trac_logo_mini.png, width=107, height=30)]]
To add these automatically Trac would have to know how to parse various image file formats. It's not obvious to me that the benefits of that would outweigh the downsides.
comment:3 by , 10 years ago
Milestone: | next-stable-1.0.x |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
I think the argument in comment:2 is enough to close this as worksforme.
Looks like you are probably correct about this: SO:1247693/121694. I'll do some more research. Would you like to provide a patch (PatchWelcome)?