Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#391 2022-02-25 11:07:02
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
phiw13 on Codeberg
Offline
#392 2022-02-25 11:27:46
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
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
phiw13 on Codeberg
Offline
#394 2022-02-25 11:45:01
Re: smd_thumbnail: manage multiple thumbnails of your images
phiw13 wrote #332817:
That or an updated
GDversion, 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: 110
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
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
phiw13 on Codeberg
Offline
#397 2023-06-08 05:38:46
Re: smd_thumbnail: manage multiple thumbnails of your images
Thanks for the report. I’ll see if I can investigate on the shiny new demo server that has PHP 8.3 on it.
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
#398 2023-06-08 07:06:12
Re: smd_thumbnail: manage multiple thumbnails of your images
Hmm. Scratch that, it seems there is something in my .htaccess that prevents the redirect to work. Strange as there is nothing special there…
And of course after disabling and enabling this or that for testing, everything keeps on working…
Gremlins?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#399 2023-06-08 23:46:45
Re: smd_thumbnail: manage multiple thumbnails of your images
phiw13 wrote #335495:
Gremlins?
Not gremlins :-(. Strict(er) CSP at work. The redirect-after-upload is inline-script dependent, here
I thought I had hacked my way out with tons of "script-src-attr 'unsafe-hashes' 'SHA256-XXXXXXX'. Still some devils are popping up.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#400 2023-06-09 05:33:07
Re: smd_thumbnail: manage multiple thumbnails of your images
Good catch. That should use script_js(). Will fix, 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
#401 2023-08-10 09:51:26
- Steven
- New Member
- Registered: 2023-08-10
- Posts: 1
Re: smd_thumbnail: manage multiple thumbnails of your images
maniqui wrote #288361:
An smd_thumbnail snippet for those who want to do responsive images using the
img/srcset/sizescombo.In your form or page template:
<txp:images>...
<!-- img-srcset form -->...Of course, you have to tune your
srcsetandsizesattributes to what you are trying to achieve.
Here is an excellent article on the topic:
ericportis.com/posts/2014/srcset-sizes/See also:
scottjehl.github.io/picturefill/Edit: forgot to add a wrapping
<txp:images>that would provide the necessary imageid(<txp:image_info type="id" />) that is “fed” to<txp:smd_thumbnail id="..." />. Addedaltattribute too.
maniqui wrote #288459:
You are right, Phil. I always forgot that damned alt attribute.
To do it exactly correct: alt=’<txp:image_info type=“alt” />’
Thanks for this snippet. Very usefull. Using TXP again after 6 years. A bit ‘ how did I do that?’ but it is so intuitive to use. Great cms.
Offline