Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted March 27Mar 27 Hi, I know webp support was added around the ~ 4.6 release time but seems that it was never correctly implemented for preview images (screen shots) in the downloads app. If you add a webp file as one of your screen shot (preview images) you get a system error after hitting submit. Can someone else running on 4.x confirm this? This error indicates that the system is encountering an issue while trying to generate a thumbnail for the preview image. The stack trace shows that the function IPS_Image::create() is being called with an empty parameter, which suggests that it failed to process the file properly.This only happens when using a WebP file, it’s likely that the Invision Power Downloads application isn’t handling the WebP format correctly in only here in the downloads application. (works perfectly in the forums) Using it for a preview image ends up triggering an InvalidArgumentException.Thank you :)
March 27Mar 27 Author Just tried. It works for me.I can get to step 2 like you did there. It fails on me after hitting submitThanks for testing. Which version of 4.x is that?Can you try and hit submit?odd, it works everywhere for me except in downloads app. Edited March 27Mar 27 by SJ77
March 27Mar 27 Author Last version of 4. Yes, I have submitted the file and it is processed correctly.Great, thank you for testing! It confirms an issue on my end ugh! 🤷♂️
March 27Mar 27 Author I’ve got a bit more info now.It seems to work with an older version of ImageMagick, but not the latest one. It’s not clear if the bug is with IPS or ImageMagick itself.I spoke to a developer, and here’s what they found:I think it's a problem with the ImageMagick version installed:I tested on my local development server, and it was all good => ImageMagick v6.9.12-61I tested on my dev site on this server, and it threw an error => ImageMagick v7.1.1-43InvalidArgumentException: (0) #0 /home/domain.net/system/File/File.php(330): IPS\_Image::create() #1 /home/domain.net/system/File/File.php(1595): IPS\_File::create() #2 /home/domain.net/applications/downloads/modules/front/downloads/submit.php(336): IPS\_File->thumbnail() #3 /home/domain.net/system/Helpers/Wizard/Wizard.php(181): IPS\downloads\modules\front\downloads\_submit->IPS\downloads\modules\front\downloads\{closure}() #4 /home/domain.net/applications/downloads/modules/front/downloads/submit.php(685): IPS\Helpers\_Wizard->__toString() #5 /home/domain.net/system/Dispatcher/Controller.php(107): IPS\downloads\modules\front\downloads\_submit->submit() #6 /home/domain.net/applications/downloads/modules/front/downloads/submit.php(35): IPS\Dispatcher\_Controller->execute() #7 /home/domain.net/system/Dispatcher/Dispatcher.php(153): IPS\downloads\modules\front\downloads\_submit->execute() #8 /home/domain.net/index.php(13): IPS\_Dispatcher->run() #9 {main}
March 27Mar 27 Community Expert You'll need to ensure your configuration for the latest major release v7 is configured correctly to handle image extensions which you require.
March 27Mar 27 Community Expert @Jim M To add something more: Either IM v7 changed how the data is handled compared to v6 (and thus IPS needs to implement a fix), or there's simply a bug in IM v7 in how the webp images are handled (not something IPS can fix).Not sure which one it is, though.WEBP is listed as a supported format on both servers I tested with. 🙄 Edited March 27Mar 27 by teraßyte
March 27Mar 27 Author @Jim M To add something more:WEBP is listed as a supported format on both servers I tested with. 🙄Same thing on my server. And given that it works perfectly fine in the forums and only has an issue in downloads app concerns and confuses me.
March 27Mar 27 Community Expert Same thing on my server. And given that it works perfectly fine in the forums and only has an issue in downloads app concerns and confuses me.Right, I missed that. Since it works when uploading the image as an attachment in the editor, there must be a bug specific to uploading screenshots in downloads when it generates the thumbnail.
March 28Mar 28 Community Expert I have created a bug report on this, in case its an issue specific to what we are doing with imagemagick.