Forum 9

Bookkeeping => Bugs and Feature Requests => Topic started by: snow on Mar 21, 2025, 07:37 PM

Title: lightbox for images
Post by: snow on Mar 21, 2025, 07:37 PM
i keep clicking the scaled-down desktop pictures in the desktop thread and they aren't becoming bigger!!
Title: Re: lightbox for images
Post by: lifning on Mar 21, 2025, 07:56 PM
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
Title: Re: lightbox for images
Post by: Skirmisher on Mar 23, 2025, 03:48 AM
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 :(
Title: Re: lightbox for images
Post by: snow on Mar 23, 2025, 06:09 AM
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  :-\
Title: Re: lightbox for images
Post by: Skirmisher on Mar 23, 2025, 06:27 AM
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,
Title: Re: lightbox for images
Post by: snow on Mar 23, 2025, 06:28 AM
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)
Title: Re: lightbox for images
Post by: viviridian on Mar 23, 2025, 11:35 AM
coding directly in prod on smf is such a vibe. this is what the docker whale took from us