Coder Social home page Coder Social logo

Can't run squidge command about squidge HOT 22 OPEN

ainsleyclark avatar ainsleyclark commented on July 23, 2024
Can't run squidge command

from squidge.

Comments (22)

supersonic2k22 avatar supersonic2k22 commented on July 23, 2024 1

from squidge.

supersonic2k22 avatar supersonic2k22 commented on July 23, 2024 1

@myedgy look for an error, maybe the conversion parameters are incorrectly specified. I used before this plugin and for me it was worked. So maybe you have some error in code or environment.

from squidge.

supersonic2k22 avatar supersonic2k22 commented on July 23, 2024 1

Hi @supersonic2k22 @myedgy thanks for your comments with everything. I'll look into it in the coming weeks but would really appreciate any pull requests.

@supersonic2k22 will the pull request you opened fix above? Sorry just catching up appreciate the help.

Hello, I added to my version - counter and changed the path to cli. @ainsleyclark You can try my version and fix some errors if you want. If you want to update the plugin with my support we can discuss it in direct messages. I have some ideas to improve the plugin.

from squidge.

ainsleyclark avatar ainsleyclark commented on July 23, 2024 1

@supersonic2k22 sounds great, my email is [email protected]

from squidge.

supersonic2k22 avatar supersonic2k22 commented on July 23, 2024

I solved this problem. You have an error in the code. In Linux filename that is case sensitive. Please in the main plugin file, require, changing the name of the file to solve this error. From commands.php to Commands.php

from squidge.

ainsleyclark avatar ainsleyclark commented on July 23, 2024

Hi @karbivskij
Thanks for flagging this, I will roll it out in the next update.
All the best.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

@supersonic2k22 How do you run this?
I seems not that you can optimize the images in the wordpress dashboard right?

You need to do this via putty?
Can you assist me please

My wordpress install path is
/home/admin/domains/mydomain.com/public_html/

wp squidge run path=home/admin/domains/mydomain.com

Warning: No WordPress installation found. If the command 'squidge run path=home/admin/domains/mydomain.com' is in a plugin or theme, pass --path=path/to/wordpress.
Error: 'squidge' is not a registered wp command. See 'wp help' for available commands.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

positive vibes your way, mate :)

from squidge.

supersonic2k22 avatar supersonic2k22 commented on July 23, 2024

@myedgy
I remember that in the plugin we have an error with font case. You can download my version of this plugin. If you need the support from me we can connect in telegram or another messenger.
My edited version with few commits - https://github.com/supersonic2k22/squidge

from squidge.

supersonic2k22 avatar supersonic2k22 commented on July 23, 2024

@myedgy
In the original plugin, you need to change this lines 29-32 in file squidge.php
from
// Require CLI. if (file_exists(__DIR__ . '/cli/commands.php')) { require(__DIR__ . '/cli/commands.php'); }
to
// Require CLI. if (file_exists(__DIR__ . '/cli/Commands.php')) { require(__DIR__ . '/cli/Commands.php'); }
@ainsleyclark please fix this error, I told you about it before. But plugin still not changed.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

@supersonic2k22 Roman, thank you so much!

Yes, this was still the issue! Now i can run it! Fack sake, i read about this, i thought it was fixed. I was searching for days already, why i couldn't run it.

I found the map with Commands.php and C was with a capital so i thought it was already fixed in the latest update.

@ainsleyclark are you still active? Because you have build an amazing plugin, one of its kind. Tried already a few CDN networks but they are all so freaking slow when loading the images. So i was looking for something to run on our own server.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

The conversions start, but when i check the upload folder i only can find .jpg.webp files and not .jpg.avif files ?
Anyone has noticed this or is it working for you guys?

wp squidge run
or
wp squidge run --avif=true --quality=80 --optimization=o3

It starts in pcli

Processing image: b50d6840-ff0c-4daa-b052-cbf3a7033a10
WebP Conversion...
AVIF Conversion...
JPG Compression...
PNG Compression...
Success: Processed image: b50d6840-ff0c-4daa-b052-cbf3a7033a10

Also, I assume I had to add the content of the Functions.php file copy paste it in my child-themes functions.php

When I do wp squidge health
I also notice to receive first these warnings:

Deprecated: Return type of Carbon_Fields\Pimple\Container::offsetExists($id) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/admin/domains/y.com/public_html/wp-content/plugins/squidge/vendor/htmlburger/carbon-fields/core/Pimple/Container.php on line 128 Deprecated: Return type of Carbon_Fields\Pimple\Container::offsetGet($id) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/admin/domains/y.com/public_html/wp-content/plugins/squidge/vendor/htmlburger/carbon-fields/core/Pimple/Container.php on line 93 Deprecated: Return type of Carbon_Fields\Pimple\Container::offsetSet($id, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/admin/domains/y.com/public_html/wp-content/plugins/squidge/vendor/htmlburger/carbon-fields/core/Pimple/Container.php on line 74 Deprecated: Return type of Carbon_Fields\Pimple\Container::offsetUnset($id) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/admin/domains/y.com/public_html/wp-content/plugins/squidge/vendor/htmlburger/carbon-fields/core/Pimple/Container.php on line 138

from squidge.

supersonic2k22 avatar supersonic2k22 commented on July 23, 2024

@myedgy It is because your server does not has a library for converting to AVIF format. You need to install this library, please read the documentation of the plugin.

Please check this in admin dashboard of WordPress -
image

from squidge.

myedgy avatar myedgy commented on July 23, 2024

@supersonic2k22 the library is active since i installed the plugin, I had read this, and the plugin also said that I needed to install this library first. So I did on my debian 11 system.

Update the package index:

sudo apt-get update

Install libavif-dev deb package:

sudo apt-get install libavif-dev

image

from squidge.

myedgy avatar myedgy commented on July 23, 2024

I'm trying to find the issue, and checking server logs if I maybe can find something.
I'm running also on OpenLiteSpeed not sure if this could be a problem.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

@myedgy look for an error, maybe the conversion parameters are incorrectly specified. I used before this plugin and for me it was worked. So maybe you have some error in code or environment.

Did you find an other plugin that can convert images to webp and avif perhaps? Without the use of a third party where you need to have a CDN subscription to convert them.

from squidge.

supersonic2k22 avatar supersonic2k22 commented on July 23, 2024

I'm trying to find the issue, and checking server logs if I maybe can find something.
also, I recommended using the original plugin, because in my version can be errors, maybe I tested some things before.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

I will try the orignal, and upload the missing folders that I could find from the first release. @supersonic2k22 and I appreciated your time and your contribute in this.

from squidge.

ainsleyclark avatar ainsleyclark commented on July 23, 2024

Hi @supersonic2k22 @myedgy thanks for your comments with everything. I'll look into it in the coming weeks but would really appreciate any pull requests.

@supersonic2k22 will the pull request you opened fix above? Sorry just catching up appreciate the help.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

@ainsleyclark @supersonic2k22
In the logs i'm unable to find any issues. I will try tomorrow the original and upload the missing folders.
Will try to create a pull request for that one.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

would be cool!

Because in CLI it says convertion works..

AVIF Conversion... Squidge: [INFO] - Successfully converted to AVIF file: /home/admin/domains/x.com/public_html/wp-content/uploads/2022/12/Maserati-GranTurismo-1.jpg.avif Squidge: [INFO] - Successfully converted to AVIF file: /home/admin/domains/x.com/public_html/wp-content/uploads/2022/12/Maserati-GranTurismo-1-300x221.jpg.avif Squidge: [INFO] - Successfully converted to AVIF file: /home/admin/domains/x.com/public_html/wp-content/uploads/2022/12/Maserati-GranTurismo-1-1024x754.jpg.avif Squidge: [INFO] - Successfully converted to AVIF file: /home/admin/domains/x.com/public_html/wp-content/uploads/2022/12/Maserati-GranTurismo-1-150x150.jpg.avif Squidge: [INFO] - Successfully converted to AVIF file: /home/admin/domains/x.com/public_html/wp-content/uploads/2022/12/Maserati-GranTurismo-1-768x565.jpg.avif

But when i go to the folder via FTP i only see WEBP convertions.

from squidge.

myedgy avatar myedgy commented on July 23, 2024

@supersonic2k22 Indeed if i try to run your version PUTTY freezes and in my server dashboard cpu load is 25 - max 35%

With the original it runs, everything. It also says it made .jpg.avif files however they are not made.. only webp.

If this plugin really works, it would be nice if you can select a folder. As i'm going to create media.mysite.com for all image uploads

https://frunction.com/2016/06/wordpress-serve-images-from-subdomain/

from squidge.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.