Opened 11 years ago

Closed 10 years ago

# Let full image displayed inside browser context

Reported by: Owned by: trac@… Radek Bartoň low ScreenshotsPlugin normal 0.10

### Description

First: Thanx for the new nice matrix-layout. But you should note, that database-scheme has changed and give a script changing it. Trac-admin isn't able to do incremental upgrades! eg., I had to remove screenshot stuff and then run trac-admin upgrade. This isn't nice.

But the real problem: I think the large pics should display inside html itself. Eg., a handler like "/screenshots/14" should return a complete html-page like "/screenshots" not just an image. (tested with r2644). Some browser are a little confused what to do with a single image (and it looks better when embedded into trac-site)

cu and thanks for the nice plugin

### comment:1 follow-up:  2 Changed 11 years ago by Radek Bartoň

Status: new → assigned

Hi.

First: I noted that in changeset comment with three exclamations and it is in code comments too. (I don't expect you should read the code but I do with changeset comment.) This revision is only partial implementation to get finished work under version control so you may wait for next one.

/screenshots/<id> was intended for screenshot file download but I can change it to: /screenshot/<id> for HTML embedded image, /screenshot/<id>?format=raw for for download and add trac.ini option for configuring what fomat should preview image links point to. Good enough for you? You can use [screenshot:<id>,<width>x<height>] macro for screenshot embedding now too with zero values for original size.

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

### comment:2 in reply to:  1 Changed 11 years ago by trac@…

First: I noted that in changeset comment with three exclamations and it is in code comments too. (I don't expepect you should read the code but I do with changeset comment.) This revision is only partial implemenation to get finished work under version control so you may wait for next one.

You're right, next time I should better read ;)

/screenshots/<id> was intended for screenshot file download but I can change it to: /screenshot/<id> for HTML embended image, /screenshot/<id>?format=raw for for download and add trac.ini option for configuring what fomat should preview image links point to. Good enough for you? You can use [screenshot:<id>,<width>x<height>] marcro for screenshot embending now too with zero values for original size.

Understand. It think while click on a preview should just display. eg., when click on it, than a html. So you may give paramters like ?action=view or such. And without parameter like now the raw image.

May that there was a mistakable phrase by me: I think it would better, when click on the preview not the raw image but a html page containing the image comes. If this is done with /screenshots/<number> or /screenshots/<number>?action=view isn't that important. And a small "download" link below previews and/or the full displayed image if someone wants see full image alone. (In fact, browsers like opera ask every time what to do with raw images...., konqueror sometimes, too)

And adding the default behavior as an option to trac.ini sounds real nice.

### comment:3 Changed 11 years ago by Radek Bartoň

I think that format=raw solution would be better because it can be easily modifed to add other formats like format=jpg (which converts all images to jpeg) etc. Maybe HTML form should be format=html and threre would be trac.ini option default_format = html. Furthermore it would be somehow consistent with Trac's attachments.

### comment:4 Changed 10 years ago by Radek Bartoň

Resolution: → fixed assigned → closed

Although old-styled layout is not implemented yet, topic of this ticket is working since r2659 so I can easily close this ticket.

### Modify Ticket

Change Properties
Action
as closed The owner will remain Radek Bartoň.
The resolution will be deleted.