Closed phiw13 closed 3 years ago
A few things at play here:
The only way to do this is to manually FTP replacement thumbnails of different types up to the server and reference them by hand in srcset/picture tags. Messy. It's exactly the same in core. If you try to replace a thumb of a different type, it will be "ignored" because the extension doesn't match that of the main image.
See 76598900.
plugin doesn't support webp yet. Easy to add.
ah… that… I was assuming it automatically supported the same types as Core (or inherited them).
does not support the concept of multiple thumbnails of different types
yeah, I know and was not trying to be all that creative. I was simply trying to replace the automatically generated (bloated) thumbs with manually created ones (the whole time dealing with .webp
images). Not trying to mix anything.
Dealing with multiple types for one “master” upload is something we hope will be possible in a future TXP, as discussed in the forum.
I will test tomorrow, but if manual upload of webp thumbs is possible with mentioned patch, this issue can be closed.
I was assuming it automatically supported the same types as Core (or inherited them).
Sadly not. There's an annoying amount of repetition in the smd_thumbnail plugin because the core API isn't (yet) flexible enough to let plugins play in innovative ways. It's getting there, and hopefully we can make great strides in 4.9 in this arena.
I was simply trying to replace the automatically generated (bloated) thumbs with manually created ones (the whole time dealing with
.webp
images). Not trying to mix anything.
Ah cool. In which case, the patch should sort you out. It works in my (limited) tests, albeit with the annoying caveat that it doesn't tell you it's done it via a status message. Grrr...
In which case, the patch should sort you out. It works in my (limited) tests, albeit with the annoying caveat that it doesn't tell you it's done it via a status message. Grrr…
Cool, uploading those thumbs in .webp
format now works, afaict. Tested with Safari and Firefox, PHP8 and PHP 7.4. The lack of status message is a bit of a nuisance of course.
Closing this as the main part (uploading .webp
images) is done.
uploading those thumbs in
.webp
format now works
Thank you for testing.
The lack of status message is a bit of a nuisance of course.
Yes. I spent some time yesterday trying to hack solutions to no avail. I suspect the smd_thumb_insert()
function should really hook into the thumbnail management callbacks in a different manner so I can do what's necessary (replace a given thumb) and then return cleanly with a $message
instead of forcing a nasty redirect due to the headers already being sent by the time the plugin is invoked. There has to be some way of triggering announce()
because @bloatware does it in core when uploading multiple files. Maybe I need to make this process run via Ajax so it doesn't need a refresh.
Hmmmm. Will put it in the back of my head and see if there's a way we can improve the image API when we do the grid/multi thumbs in core. Although that'll obviate the need for the plugin with luck!
automatic thumbnail generation works fine manual upload fails.
STR
select
widget, choose a profile then upload the appropriate image.Expected: image uploaded Actual result: no image is uploaded; no thumbnail is displayed in the panel and the image is nowhere to be found on the file system.
Debugging mode is turned on but no message is displayed.
PHP 7.4 on Dreamhost servers (CentOS) PHP 8, Homebrew edition locally (macOS 11)
The server logs (apache/php) are silent - no error. All 25+ known methods of searching the macOS file system return a blank.
Manual upload of jpg/png images works fine