View Issue Details

IDProjectCategoryView StatusLast Update
0007444mantisbtfeaturepublic2007-11-23 18:29
Reporteratomoid Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version1.1.0a1 
Summary0007444: inlined resized image display doesnt work in IE; and doesnt download in Firefox
Description

Mantis 1.1.0a1:

The new feature spawned from report 0006252: Control over display size of inlined images (might actually be two bugs):

I enabled it in my config_inc.php:
$g_preview_attachments_inline_max_size = '1000000';
$g_preview_max_width = 600;
$g_preview_max_height = 400;

Results differ per browser tested:

Firefox:

  • When click on image that is larger than setting (and has been resized in the report view), you view the image in a blank page, clicking the image zooms/unzoom, but doesnt provide a link to download, neither does the filename attachment link work, it just shows the image like clicking on the image does.

Note that images that are smaller than the min wdith (and dont get resized) behave normally (for 1.1), they bring up the download prompt when clicked.

IE:

  • Image doesnt get resized, appears inline at native resolution.
TagsNo tags attached.

Activities

atomoid

atomoid

2006-09-15 18:06

reporter   ~0013396

Last edited: 2006-09-15 18:13

I guess for the best desired behavior, you'd want to click the image so you can view full size, but i think it should it load inline in the current view (in effect, temporarily toggling the max_width and max_height setings), rather than bringing up a blank page. Its important to be able to read the description while viewing the attachemnt.

If for some reason that wont work, perhaps it would be best to display some sort of distinct 'download attachment' link handy next to the file attachement to get around this problem.

By the way, im using Windows:
Firefox 1.5.0.6
IExplorer 6.0.2900

vboctor

vboctor

2006-09-16 14:12

manager   ~0013402

The behaviour here is also related to the following configuration option:

# Extensions for images that can be expanded inline.
$g_preview_image_extensions = array( 'bmp', 'png', 'gif', 'jpg', 'jpeg' );

This tells Mantis that for these extensions you don't want to download the attachment but just view it. Once you view it, you can right click and save. However, it may be a good idea to also have a Download link. I am open for suggestions here.

I would be happy to apply patches submitted to improve the handling of image attachments.

giallu

giallu

2007-07-20 03:56

reporter   ~0015114

Victor, IMHO the comment there should be improved, since it's not clear the previewed attachment will not be downloadable (if not using the right-click "trick)

Does image manipulations exists in php? we could use something like:

if ( image_height > preview_max_height || image_width > preview_max_width )
create_thumbmail()
show_thumbnail()
else
show_original_image()

vboctor

vboctor

2007-11-23 18:29

manager   ~0016268

To create thumbnails we probably need the PHP GD extension library to be installed. What we can do is to detect when such extension is available and make use of it.

Issue History

Date Modified Username Field Change
2006-09-15 17:31 atomoid New Issue
2006-09-15 18:06 atomoid Note Added: 0013396
2006-09-15 18:13 atomoid Note Edited: 0013396
2006-09-16 14:12 vboctor Note Added: 0013402
2007-07-20 03:56 giallu Note Added: 0015114
2007-11-23 18:29 vboctor Note Added: 0016268