Server doesn’t seem to be serving your images as WebP

Keywords: WordPress - AWS - Technical issue - Plugins installation/configuration

bnsupport ID: 712f27f2-f309-951d-43cb-6992c68f4b16

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
? Php: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/use-pagespeed/#disable-pagespeed
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/
https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/
https://docs.bitnami.com/general/apps/wordpress/configuration/configure-phpfpm-processes/

bndiagnostic failure reason: The documentation did not make any significant change

Description:
I’m using Smush Pro and trying to serve my images as webp.
I added the code to the .htaccess in uploads folder manually as automatically it was failing.

The server rules have been applied but the server doesn’t seem to be serving your images as WebP. We recommend contacting your hosting provider to learn more about the cause of this issue.

How to fix this issue?

this is my new support id 0589d3b1-384d-37e5-a343-1bee5808c886
I made a new instance and imported my site!

We couldn’t create the WebP test files. This is probably due to your current folder permissions. Please adjust the permissions for “/opt/bitnami/apps/wordpress/htdocs/wp-content/smush-webp” to 755 and try again.

Now this error is being shown!

Hello @vegeta_evilprince,

This guide explains how to set the default permissions:
https://docs.bitnami.com/aws/apps/wordpress-pro/administration/understand-file-permissions/

About .htaccess, one of our main goals is to configure Bitnami applications in the most secure way. For this reason, the configuration in the .htaccess files has been moved to the main application configuration files and set the AllowOverride option to None by default, if supported by the application.

https://docs.bitnami.com/aws/infrastructure/lamp/administration/use-htaccess/

If you allow .htaccess files and place this into a folder with a configuration, you produce the same result that including this configuration inside htaccess.conf between Directory tags. For example, if you put a .htaccess file with the content below inside /opt/bitnami/apps/wordpress/htdocs:

 <IfVersion >= 2.3>
        Require all granted
    </IfVersion>

is the same that including the content below inside htaccess.conf:

<Directory /opt/bitnami/apps/wordpress/htdocs/>
 <IfVersion >= 2.3>
        Require all granted
    </IfVersion>
</Directory>

The only difference is that using htaccess.conf, you need to restart Apache every time to apply the changes.

We recommend avoid .htaccess files. However, you can allow .htaccess use if it is easier for you. In order to enable .htaccess you should change Allow Override None to Allow Override All into /opt/bitnami/apps/wordpress/conf/httpd-app.conf and restart Apache.

I hope it helps

So I include the following lines right to which file?

<Directory /opt/bitnami/apps/wordpress/htdocs/wp-content/smush-webp/>
 <IfVersion >= 2.3>
        Require all granted
    </IfVersion>
</Directory>

We recommend avoid .htaccess files. However, you can allow .htaccess use if it is easier for you. In order to enable .htaccess you should change Allow Override None to Allow Override All into /opt/bitnami/apps/wordpress/conf/httpd-app.conf and restart Apache.

if I just do this will it make my website prone to attacks? I’m mostly using some free GPL plugins so I don’t want to allow it universally, just for the plugin.

Hi @vegeta_evilprince,

You could add that code in /opt/bitnami/apps/wordpress/conf/htaccess.conf and restart apache.

It should produce the same result than having a .htaccess file in /opt/bitnami/apps/wordpress/htdocs/wp-content/smush-webp/ with the content:

 <IfVersion >= 2.3>
        Require all granted
    </IfVersion>