Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2025-12-05 00:10:23

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,287
Website Mastodon

Re: Automatic thumbnails for Textpattern

I was just in the process pf searching about for the plugin to create thumbnails on a current project using 4.9.9X. On my old 4.8.8 site i am using tom_image_grid. And i know of smd_thumbnail.
It sounds like i should just wait and use what is coming in core––which will soon arrive. Correct?


…. texted postive

Offline

#17 2025-12-05 02:08:01

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 440
Website GitHub Twitter

Re: Automatic thumbnails for Textpattern

Love it! Its not breaking a sweat / behaving itself in my testing on a site with a few hundred ‘hi-res’ images.

Bloke wrote #341470:

Really large images can make the engine spit its dummy out and refuse to render thumbnails. You’ll just get the alt tag shown because it can run out of memory. So don’t upload 20MB super hi-res pics and expect miracles. Or, if you do, whack your php.ini settings up a lot.

I’ve found that a reasonable maximum size for image originals (i.e. works with the default settings of most hosts) is a max pixel dimension of 3000 eg. 3000px by 2000px, or 2000px by 3000px. A 3000px square original is often too much to ask, memory-wise.

Offline

#18 2025-12-05 06:11:11

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,671
Website

Re: Automatic thumbnails for Textpattern

Following the latest tweaks things are working quite smoothly. I’ve updated two txp:shortcodes adapting them to the new world. and visited the pages using them, that works well so far. Lazy loading works well I think (even letting a page idle and in a background tab for like 1hour). Resizing the browser window works smoothly (all on localhost, PHP 8.5).

What was a little surprising maybe: on the dummy test install I batch uploaded some 25 images (various sizes and formats). After the upload complete the admin thumbnails did not display. After viewing the edit panel for one image caused all to appear.

Second possible surprise: I had created a page using the <txp::gallery / shortcode Jakob posted above and viewed it while only having ~5 images. After the upload above, I revisited the page (reload) largish gaps displayed where the newly uploaded images ought to. After a force reload all was well.

–^–

Some minor admin Edit > images layout tweak for the thumbnail area:

  1. a heading (h3) before the thumbnail type <label><select> block? Useful orientation for AT
  2. wrap the <label for=xxx>Thumbnail type</label> <select /> in a <p or div? -> having a container for the admin-theme design.
  3. wondering: can we get rid of the image size in the alt and title (in my case, aspect ratio is disabled, it does not provide any relevant info). I would get rid of the title attribute altogether. Same applies to the list table.

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#19 2025-12-05 08:18:22

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,238
Website GitHub

Re: Automatic thumbnails for Textpattern

phiw13 wrote #341499:

wondering: can we get rid of the image size in the alt and title (in my case, aspect ratio is disabled, it does not provide any relevant info). I would get rid of the title attribute altogether. Same applies to the list table.

Erm, *raises hand*: if you mean the tooltip on rollover on the main image, I do actually refer to from time to time when checking on an old site what image size I used at the time for the main image. Not sure if it’s relevant for the alt text though (maybe it does help some users?).

But, I could/should probably work out another more suitable way of finding out that information.


TXP Builders – finely-crafted code, design and txp

Offline

#20 2025-12-05 08:42:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,513
Website GitHub

Re: Automatic thumbnails for Textpattern

jakob wrote #341503:

Erm, raises hand: if you mean the tooltip on rollover on the main image, I do actually refer to from time to time when checking on an old site what image size I used at the time for the main image. Not sure if it’s relevant for the alt text though (maybe it does help some users?).

Ah okay, yeah, that might be helpful. I’ll reinstate the dimensions on the main image only. Saves having to open it to find out.

EDIT: Done

Last edited by Bloke (2025-12-05 08:47:40)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#21 2025-12-05 08:48:40

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,513
Website GitHub

Re: Automatic thumbnails for Textpattern

phiw13 wrote #341499:

Some minor admin Edit > images layout tweak for the thumbnail area

All done, save for the title attribute on the main image in the Edit step, as Julian noted. Thank you.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#22 2025-12-05 08:49:01

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,671
Website

Re: Automatic thumbnails for Textpattern

jakob wrote #341503:

Erm, *raises hand*: if you mean the tooltip on rollover on the main image, I do actually refer to from time to time when checking on an old site what image size I used at the time for the main image. […]

Would there be some benefit of having the width and height output in side column – as plain text, similar to the ID?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#23 2025-12-05 08:50:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,238
Website GitHub

Re: Automatic thumbnails for Textpattern

phiw13 wrote #341508:

Would there be some benefit of having the width and height output in side column – as plain text, similar to the ID?

Yes, better even, or perhaps under the image?


TXP Builders – finely-crafted code, design and txp

Offline

#24 2025-12-05 08:54:57

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,671
Website

Re: Automatic thumbnails for Textpattern

jakob wrote #341509:

Yes, better even, or perhaps under the image?

I would keep it with the other meta-data.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#25 2025-12-05 08:55:47

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,238
Website GitHub

Re: Automatic thumbnails for Textpattern

bici wrote #341495:

I was just in the process pf searching about for the plugin to create thumbnails on a current project using 4.9.9X. On my old 4.8.8 site i am using tom_image_grid. And i know of smd_thumbnail.
It sounds like i should just wait and use what is coming in core––which will soon arrive. Correct?

sacripant’s tom_image_grid should still work, and a grid view of the images is not currently in the core.

smd_thumbnail still works too – and I guess will continue to work if you don’t change the settings? –, but the recent changes in this thread mean its days are potentially numbered.


TXP Builders – finely-crafted code, design and txp

Offline

#26 2025-12-05 08:56:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,513
Website GitHub

Re: Automatic thumbnails for Textpattern

phiw13 wrote #341508:

Would there be some benefit of having the width and height output in side column – as plain text, similar to the ID?

Actually, yeah, that’s even better. Please hold and your wish will be granted.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#27 2025-12-05 09:01:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,513
Website GitHub

Re: Automatic thumbnails for Textpattern

Does the size info need its own heading in the sidebar like:

Dimensions
1600 &#215; 1200

Or can it just go in brackets alongside or under one of the other bits of info (maybe the ID?)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#28 2025-12-05 09:08:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,513
Website GitHub

Re: Automatic thumbnails for Textpattern

giz wrote #341497:

Love it!

Yay!

I’ve found that a reasonable maximum size for image originals… is a max pixel dimension of 3000.

Good info, thanks. That echoes what I’ve found so I think there are definitely optimisations to be had under the hood of SLIR. I haven’t grokked most of the code yet – only the bits I needed to integrate it with core – so there’s lots to wade through and there may be places where we can improve the way the GD resizer works by comparing that with how our class.thumb does it. That seems to be able to handle bigger images than SLIR does.

But as I mentioned in the OP, writing a parallel Imagick class for SLIR would be really beneficial because it does a lot more, and more efficiently. That will have to wait for Txp 5, since we’ll need PHP 7+ (and time) for that.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#29 2025-12-05 09:16:05

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,671
Website

Re: Automatic thumbnails for Textpattern

Bloke wrote #341513:

Does the size info need its own heading in the sidebar like: […]

Or can it just go in brackets alongside or under one of the other bits of info (maybe the ID?)

I would prefer separate field, it is different data after all (with px at the end?)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#30 2025-12-05 09:26:17

etc
Developer
Registered: 2010-11-11
Posts: 5,690
Website GitHub

Re: Automatic thumbnails for Textpattern

I don’t understand half of it, but this looks big. Hurrying up to test.

Offline

Board footer

Powered by FluxBB