Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 Today 08:55:47

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,087
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 Today 08:56:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,126
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.

Txp Builders – finely-crafted code, design and Txp

Online

#27 Today 09:01:27

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

Re: Automatic thumbnails for Textpattern

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

Dimensions
1600 × 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.

Txp Builders – finely-crafted code, design and Txp

Online

#28 Today 09:08:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,126
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.

Txp Builders – finely-crafted code, design and Txp

Online

#29 Today 09:16:05

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,555
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 Today 09:26:17

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

Re: Automatic thumbnails for Textpattern

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

Offline

#31 Today 09:47:14

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

Re: Automatic thumbnails for Textpattern

phiw13 wrote #341515:

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

Howzat?


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

Txp Builders – finely-crafted code, design and Txp

Online

#32 Today 09:53:10

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

Re: Automatic thumbnails for Textpattern

etc wrote #341517:

I don’t understand half of it, but this looks big.

It’s big and not big at the same time. I’ve had this in various local playgrounds and various guises for ages, including as a sort-of plugin that was going to be the successor to smd_thumbnail. But it just seemed so much extra effort for a plugin to rewire the thumbnail process (see how much wrangling smd_thumbnail has to do!) that it just made sense to roll it up and bundle it in core.

The footprint is comparatively tiny for the benefit of being able to securely output images at any size, without having to bounce back to the Edit panel and create a new profile for width, height and crop, then regenerate the images, and force those sizes on every image whether it needed it or not, whether it was SVG or not, whether it was tiny or not and exploded in a shower of jaggy pixels, and so on. SLIR takes all that away with true on-demand image creation, cacheing and garbage collection so Txp only creates the thumbnail images you need on both the back-end and public-facing site. It cuts directory bloat. Cuts admin hassle. But still retains the backwards-compatible fixed-dimension thumbnail that’s been in Txp since day 1 if you wish to use it.

Hurrying up to test.

Thank you. The big things left to check:

  1. Does it hold up on localhost as well as online?
  2. Does it work reliably with subdir installs?
  3. How does it handle Article Images (specifically com_article_image).
  4. Is it error-free when using Article Images that are URLs?
  5. Can the thumbnail creation process be triggered from a bulk upload reliably (Ajax-fu required by someone).
  6. Are there any further optimisations we can employ?

Last edited by Bloke (Today 09:59:47)


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

Txp Builders – finely-crafted code, design and Txp

Online

#33 Today 09:53:55

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

Re: Automatic thumbnails for Textpattern

Bloke wrote #341518:

Howzat?

Thumbs up 👍 👍
Thanks. This can be viewed by everyone.


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

Offline

#34 Today 10:02:02

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

Re: Automatic thumbnails for Textpattern

phiw13 wrote #341521:

Thumbs up 👍 👍
Thanks. This can be viewed by everyone.

Here too 👍 👍. Thanks.

My instinct is to shift it up alongside the ID to save space, but that’s easily done in a custom theme (css) with float:left and margin-inline-end on the id block in css.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB