Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2020-08-04 10:00:25

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,577
GitHub

Re: Multiple image handling: profiles

No harm, no foul.

Offline

#26 2020-08-04 10:13:10

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,531
Website GitHub Twitter

Re: Multiple image handling: profiles

Image Intervention has optional support for Laravel, but the base library is 102kb zipped. Considering what it does I think that is not too bad. The caching module add-on (Intervention Request) is about 77kb zipped.

EDIT: I’ve just loaded Image Intervention with composer and it’s looking around 475kb total with additional libraries. Intervention Request caching add-on requires Symfony though, so that one is massive and unfeasible. So maybe just the Image Intervention alone.

Offline

#27 2020-08-04 10:14:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,468
Website GitHub

Re: Multiple image handling: profiles

Yeah, I just unpacked it as you were typing – see my edit above.


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

Offline

#28 2020-08-04 10:18:19

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,577
GitHub

Re: Multiple image handling: profiles

See also github.com/thephpleague/glide – powered by Image Intervention, framework-agnostic.

Offline

#29 2020-08-04 10:24:07

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,531
Website GitHub Twitter

Re: Multiple image handling: profiles

Nice, let’s get the CSP issue ticked off and I’ll help where I can with implementing a test of Image Intervention (should have some time next week).

Offline

#30 2020-08-04 10:29:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,468
Website GitHub

Re: Multiple image handling: profiles

gaekwad wrote #325135:

See also github.com/thephpleague/glide – powered by Image Intervention, framework-agnostic.

Nice! An additional 79KB plus whatever baggage composer brings in. I like that Glide can sign image requests, for security. That’s neat.


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

Offline

#31 2020-08-04 10:42:31

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,531
Website GitHub Twitter

Re: Multiple image handling: profiles

Bloke wrote #325138:

Nice! An additional 79KB plus whatever baggage composer brings in.

Just composer installed the whole lot (Glide, Intervention Image and Flysystem) and the size is about 900kb. That gives us image editing tools, image caching and (via Flysystem) the ability to add and use adapters to write the final images directly to services such as Amazon S3 and Azure. Pretty impressive.

Offline

#32 2020-08-04 11:15:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,468
Website GitHub

Re: Multiple image handling: profiles

That’s not a bad package indeed. This is sounding viable.


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

Offline

#33 2020-08-04 14:26:02

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 309
Website

Re: Multiple image handling: profiles

Bloke wrote #325090:

It’s far better for users to just drag an image – whatever the size (max file upload limits notwithstanding) – and have Txp automatically generate every image size that we – the designers – have decreed we require. So it makes us a max-res 1600px image, plus a 1280px, plus an 800px and a 300px image because we know that our design supports those sizes.

The fact we never use the “collosal” original is a small price to pay for the end-user convenience of just being able to throw pretty much any image at the CMS and have the designer (the person who has set up the image profiles and breakpoints and templates) handle everything on their behalf.

Yes. These two brief paragraphs nail it. Image confusion is the one consistent issue I have in handing sites over to customers. Having the above capability in 4.9 in a manor that’s easy to use would be huge for Textpattern.

Offline

#34 2020-08-04 14:43:34

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,404
Website Twitter

Re: Multiple image handling: profiles

Hi,

if handling images is like described by Stef then it will be a huge improvment in simplicity for end users.

I am eager to see the first draft of that.

Cheers.

Offline

#35 2020-08-04 15:12:15

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 263
Website GitHub GitLab Twitter

Re: Multiple image handling: profiles

philwareham wrote #325122:

  1. You upload an original image at whatever max size it was created at. No processing is done on that image

I do not know PHP GD module capabilities nor Tinify quantization technique, but its Panda drastically eliminates my PNG and JPEG overweight without compromising image quality — and thus with no options, no questions about desired image size. Panda offers free Tinify API for HTTP, PHP, Node.js, WordPress and other CMS.

Sometimes I check my new pictures by another similar online service called Cloudinary, although it optimizes images on webpage only.

(i.e. it stays at original dimensions/file size). That is your master image, for want of a better word.

  1. Textpattern then creates one or a number of different sizes of that image depending on what profiles you have set up (we can define some defaults as a starting point).

That is what I meant naming it default txp:image — not txp:thumbnail, and not an original full-size master image, thank you.

EDITED: I remembered Cloudinary, too.

Last edited by Vienuolis (2020-08-04 15:36:37)

Offline

#36 2020-08-04 15:40:09

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,531
Website GitHub Twitter

Re: Multiple image handling: profiles

Vienuolis wrote #325146:

I do not know PHP GD module capabilities nor Tinify quantization technique, but its Panda drastically eliminates my PNG and JPEG overweight without compromising image quality

Image optimisation tools are a separate discussion in my opinion, and perfect for plugin territory, once we have the fundamental image processing and UX nailed down.

You simply run whatever optimisation tool you have signed up for over your images directory. Indeed, all the third-party integrations mentioned in the Tinify website are simple scripts to point the API at the right image directory of the CMS.

Offline

Board footer

Powered by FluxBB