Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#385 2021-12-07 10:44:21

hidalgo
Member
From: Australia
Registered: 2008-02-05
Posts: 77
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Thanks for taking a look.

I’m also getting an error on image upload with the plugin enabled:

Warning "chmod(): No such file or directory".

But this is also happening on 4.8.7 (with PHP version: 8.0.13)

Last edited by hidalgo (2021-12-07 10:46:23)

Offline

#386 2021-12-07 11:47:32

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,196
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

hidalgo wrote #332108:

I’m also getting an error on image upload with the plugin enabled:

Warning "chmod(): No such file or directory"....

But this is also happening on 4.8.7 (with PHP version: 8.0.13)

Yes, I mentioned that upthread, here. It is a annoying, but no bad things happen, as far as I can tell.


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

Offline

#387 2021-12-07 12:57:56

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

Re: smd_thumbnail: manage multiple thumbnails of your images

hidalgo wrote #332099:

I’m currently using Textpattern 4.8.8-dev and noticed that the thumbnail profile Quality () setting is ignored, and generates images at the default 75 quality only.

Certainly me, when introducing avif format, sorry. The image quality does not seem to be used by core, but I have forgotten the plugins…

Edit: should be fixed, please test.

Offline

#388 2022-01-13 10:35:08

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,732
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Not sure if this is specific to smd_thumbnail. Yesterday a client came across a strange occurrence: an image uploaded in portrait format to the images panel displays fine but the smd_thumbnailed versions that were automatically created were in landscape format.

I was able to solve the problem by opening and re-saving the image in photoshop, and then uploading it again. The thumbnails were then correct.

Does this mean perhaps that an image can record orientation in more than one place – perhaps actual image orientation and display orientation –, and that textpattern is recognizing one but the resize function isn’t? Any ideas?

EDIT: See below – it appears to happen in the core thumbnail generation too so not specific to smd_thumbnail.


TXP Builders – finely-crafted code, design and txp

Offline

#389 2022-01-13 11:24:34

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,196
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

I haven’t seen that, so far.

Speculation: browsers (last 2 years ? something like that) read the image orientation EXIF data; there is a CSS property to control that: image-orientation. Textpattern does not read that data afaict, but. Is is possible that more recent versions of GD (latest is 2.3.3) now actually reads that and uses it when processing an image such as resizing?


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

Offline

#390 2022-02-25 10:22:36

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,732
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

jakob wrote #332413:

Not sure if this is specific to smd_thumbnail. Yesterday a client came across a strange occurrence: an image uploaded in portrait format to the images panel displays fine but the smd_thumbnailed versions that were automatically created were in landscape format.

Can I bump this? Another client reported this on the current txp 4.8.8 also with smd_thumbnail installed but not sure if this is core related or plugin related.

EDIT: See below – it appears to happen in the core thumbnail generation too so not specific to smd_thumbnail.

EDIT: I’ll try and get hold of some of the originals and test with and without the plugin. Maybe the image metadata provides some clues.

EDIT II: After a bit more sleuthing, it does seem to be happening to the smd_thumbnail created thumbnails. The main image uploaded to textpattern has the correct orientation. The previews shown in com_article_image have the correct orientation but the images on the actual page – output from the smd_thumbnails as a srcset – partially show sideways or upside-down.


TXP Builders – finely-crafted code, design and txp

Offline

#391 2022-02-25 11:07:02

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,196
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

jakob wrote #332814:

EDIT II: After a bit more sleuthing, it does seem to be happening to the smd_thumbnail created thumbnails. The main image uploaded to textpattern has the correct orientation. The previews shown in com_article_image have the correct orientation but the images on the actual page – output from the smd_thumbnails as a srcset – partially show sideways or upside-down.

Does it also happen when generating a thumbnail without the plugin? (the default TXP set up)


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

Offline

#392 2022-02-25 11:27:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,732
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

phiw13 wrote #332815:

Does it also happen when generating a thumbnail without the plugin? (the default TXP set up)

Thanks for that astute pointer. Yes, it does!! So it’s probably Textpattern’s thumbnail creation routine. More details on the image EXIF in a moment.

I’ve opened this issue in a new thread.


TXP Builders – finely-crafted code, design and txp

Offline

#393 2022-02-25 11:32:08

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,196
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

jakob wrote #332816:

Thanks for that astute pointer. Yes, it does!! So it’s probably Textpattern’s thumbnail creation routine. More details on the image EXIF in a moment.

That or an updated GD version, or some image library used by GD (? I am very unfamiliar how that all holds together).


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

Offline

#394 2022-02-25 11:45:01

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,732
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

phiw13 wrote #332817:

That or an updated GD version, or some image library used by GD (? I am very unfamiliar how that all holds together).

Good point. I’ll add the relevant details from phpinfo to that thread.


TXP Builders – finely-crafted code, design and txp

Offline

#395 2022-12-09 05:25:31

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 99

Re: smd_thumbnail: manage multiple thumbnails of your images

I think I just had a related problem on a site, though to do with aspect ratio rather than rotation. TXP 4.8.8, PHP 8.0 & 8.1

First time client uploaded a new batch of images none of them generated thumbs, as they were all Adobe RGB colour profile, not sRGB.
That fixed, he tried again, and this time they were all fine except for portrait and square images. The image uploaded, but only two of the thumbnails were generated.
In one of these images, I tried creating the thumbs individually from the image edit page, and one was throwing the white screen 500 error – the image assigned as default – a cropped landscape image.
The problem persisted with that thumbnail 286×256 size even after I switched the default to something else.

When the plugin was deactivated I could set the thumbnail dimensions to 286×256 and thereafter it would generate this as default thumb on upload of a new image.

I rolled back to ea-php74 and all was fine again.

GD on 7.4 and 8.0 is the same: GD Graphics Library: bundled (2.1.0 compatible); In successful default thumbs (7.4 & 8.0): CREATOR: gd-jpeg v1.0 (using IJG JPEG v62)

Offline

#396 2023-06-08 04:23:59

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,196
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

PHP 8.2.6 + TXP 4.9-dev / localhost

attempting to upload a thumbnail for a specific profile partial failure.

after selecting a profile, selecting an image in the upload widget and clicking the upload button “something” happens and then you’re left staring at blank screen – the url in the location bar contains this: […]textpattern/index.php?event=image&step=smd_thumbnail_insert. Returning to the images panel, and then viewing the affected image reveals that the thumbnail image has indeed been uploaded and replaced.

No error messages or other debug notifications.

the same action with PHP 8.1.x and TXP 4.9-dev on a live server works flawlessly.


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

Offline

Board footer

Powered by FluxBB