Frequently Asked Questions about Opti MozJpeg Guetzli Webp

In this page I gradually give answers to the most frequent questions about my image optimization plugin for WordPress, the Opti MozJpeg Guetzli Webp. Please, read this page, it will make you more knowledgeable during your work with the plugin. If you have more questions – write me a message. Click here to do it.

 

The list of the questions:

Can’t connect to the virtual machine

My computer has Private IP

Is it safe to use Opti MozJpeg Guetzli Webp free online server ?

How to optimize images in specified folders only ?

May Opti MozJpeg Guetzli Webp be a virus or a trojan ?

WebP duplicates and CloudFlare CDN

How to install encoders into Linux

 

Can’t connect to the virtual machine

Opti MozJpeg Guetzli WebP users often have issue with connecting the plugin to the virtual machine. If you also faced such issue, then:

1) Check does your computer (with the virtual machine) has real IP address. If it has private network IP address (like 192.168.?.? or 10.?.?.?) – it is indeed impossible to connect to it from the internet. Because such IP addresses are valid only within a private network. In this case connect your computer directly to the internet, or set up NAT in your router. Here is more information about private IP addresses.

2) If your computer already has SSH server installed, VirtualBox will be unable to use 22 port, because it is busy. You can use another port for VirtualBox in this case.

 

3) Check is VirtualBox able to open the port, you have defined. Run the virtual machine. If your computer is running Windows – open the command prompt with Administrator privileges and enter:

netstat -bn

If it is running Linux – execute:

lsof -i | less

and check what ports are open by VirtualBox

 

My computer has Private IP, help

In most cases people have private IP if they use router (Wi-Fi for example). If you are using router, then turn it off and connect your computer directly to the internet with a wire. It is the simplest way.

More complicated way is to configure NAT in your router. It should be described in router’s manual. Open you router configuration and set up NAT for

YourExternalIP:22 → YourPrivateIp:22

 

Is it safe to use Opti MozJpeg Guetzli Webp free online server ?

Yes, sure. Despite all server clients use the same login and password (z@55555), it is impossible to view or delete each other files. This is because “z” can not list files inside /home/z/wpmjgu. This account can create, delete, read and write files inside /home/z/wpmjgu. But to do that the filename is required. When the plugin uploads an image to the server, it appends 32 random chars to image’s filename. So it is impossible to guess another user’s filenames. There is a possibility to obtain filenames form the list of running processes. Therefore access to the /proc folder is forbidden for “z”.

 

How to optimize images in specified folders only ?

You will need to set a Path filter for that. Take a look at example screenshot:

The plugin will optimize only images in */wp-content/uploads/2017/11/* and */wp-content/uploads/2017/12/* folders. Other images will be skipped. Path filters are collating with an image’s path sequentially, from left to right and from top to bottom. Only the first matching filter is used. So, the third filter from example [* SKIP] will bypass all images, that not match to the first and the second filters. 75 and 80 are quality levels for images specified by the first and the second filters from example.

 

May Opti MozJpeg Guetzli Webp be a virus or a trojan ?

Opti MozJpeg Guetzli Webp is inside wordpress.org plugins repository. It is not easy to get there. First new plugin have to pass code audit. If later some threats or vulnerabilities are discovered (for example someone complained to wordpress.org admins), the plugin will be instantly removed from the plugins repository. So if a plugin is in the repository, at least nobody complained about it.

Now about the virtual machine with encoders. Even if the virtual machine had virus, it couldn’t damage your computer. Because everything inside a virtual machine works in separate environment. So a virus should first hack the virtual computer (Oracle VirtualBox) from inside, and it is almost impossible. Running something inside a virtual machine is well known method to protect your system from threats.

 

WebP duplicates and CloudFlare CDN

Unfortunately CloudFlare can’t distinguish different mime types inside same url. So CloudFlare will cache first queried image per url. If somebody query jpg image first, jpg will be cached. If somebody query webp duplicate first, webp duplicate will be cached. As the result webp/non webp switching in .htaccess will not work properly with CloudFlare cache. There are two ways to resolve this problem:

  1. Don’t generate wepb duplicates in the plugin. But generate them in CloudFlare. CloudFlare has built-in webp generation. But it is available only in “Pro” plan, which costs $20 per month
  2. Disable image caching in CloudFlare. From my experience server response time in Google Pagespeed is better through CloudFlare, even if images caching is disabled. So it is better not resign CloudFlare at all

 

How to install encoders into Linux

If your desktop is running Linux, you can install Ssh server and encoders into it. And not use the plugin’s virtual machine. It will save resources and increase optimization performance. Another variant is to install encoders directly into your website’s server. It will make the work with the plugin more simple. I created short manual how to do it. I am using Debian Linux, so my manual is for Debian 9.4. For another Linux distributions the procedure is the same, but packages names may be different.

● Mozilla MozJpeg

MozJpeg isn’t distributed as prebuilt package. You will need to compile it from source codes. First install required packages:
su
apt-get update
apt-get install git make autoconf automake libtool nasm pkg-config libpng-dev

Then create an empty directory with write access and enter it. Execute the following commands:

git clone https://github.com/mozilla/mozjpeg
cd ./mozjpeg
autoreconf -fiv
mkdir build && cd build
sh ../configure --prefix=/opt/mozjpeg
make install

Don’t worry about «error: ignoring unknown tag NASM». This message is not real error.

● Google Guetzli

Guetzli also isn’t distributed as prebuilt package. You will need to compile it from source codes too:

su
apt-get update
apt-get install g++
apt-get install git make autoconf automake libtool nasm pkg-config libpng-dev
git clone https://github.com/google/guetzli
cd ./guetzli
make
mkdir /opt/guetzli
cp ./bin/Release/* /opt/guetzli

● Google WebP

Google WebP is available as Debian prebuilt package. To install it run:

su
apt-get update
apt-get install webp

But it will be installed to /usr/bin (not to /opt/webp). Therefore set /usr/bin as path to cwebp in Opti MozJpeg Guetzli WebP settings.

 

My photo

Hi. Welcome to my website. My name is Ihor. I am a web programmer with fifteen years of experience. I work online, as a freelancer. I do projects in English, Russian, Polish and Ukrainian languages. Live in Lviv, Ukraine.