lightbox for images

Started by snow, Mar 21, 2025, 07:37 PM

Previous topic - Next topic

snow

i keep clicking the scaled-down desktop pictures in the desktop thread and they aren't becoming bigger!!

lifning

honestly i think i'd be happiest with a target=_blank so the fullsize image opens in a new tab - combined with a content-disposition that doesn't turn it into a download. i've never met a javascript lightbox that felt good
You cannot view this attachment.
Please consider the environment before printing this post.

Skirmisher

Quote from: lifning on Mar 21, 2025, 07:56 PMcombined with a content-disposition that doesn't turn it into a download
Yeah this is the thing that bugs me the most about image attachments right now :(

snow

Oof, I didn't even realize it was forcing download too.

The attachment rendering code is a bit of a mess. URLs already support inline content-disposition via adding ;image to the URL, but the code that renders the images wouldn't be easy to hook. Guess I'll have to patch the core code for this one  :-\

Skirmisher

Oh the `;image` thing is a good workaround, thanks—wait, you already went and added it to the image URLs while I wasn't looking,

snow

Sorta done. Patch attached, I'll make it a proper mod Eventually(tm).

Although now @lifning's signature is clickable. In theory I could make an argument like [attach nolink ...], but I'd have to modify the editor JS too.

Quote from: Skirmisher on Mar 23, 2025, 06:27 AMOh the `;image` thing is a good workaround, thanks—wait, you already went and added it to the image URLs while I wasn't looking,

Yeah, I'm just casually coding in prod 8)

viviridian

coding directly in prod on smf is such a vibe. this is what the docker whale took from us