• Resolved peterstevens

    (@peterstevens)


    Server configuration error
    Requests to images are processed by your server bypassing Apache. When loading images, rules from the .htaccess file are not executed. Occasionally, this only applies to known file extensions: .jpg, .png, etc. and when e.g. .png2 extension is loaded, then the redirections from the .htaccess file work, because the server does not understand this format and does not treat it as image files. Check the redirects for .png file (for which the redirection does not work) and for .png2 file (for which the redirection works correctly).

    Change the server settings to stop ignoring the rules from the .htaccess file. Please contact your server administrator.

Viewing 9 replies - 16 through 24 (of 24 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @hristo-sg Why does the Gd library not support WebP on your hosting? PHP imagewebp function not available.

    Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    On cPanel it should just work if webp files are properly set as image mime types (.htaccess code provided above).

    On Site Tools .htaccess redirects are completely unecessary and they won’t work properly if the NGINX Direct Delivery is enabled for the client.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @hristo-sg The redirects are needed because I want to redirect original images to WebP images only if the browser supports WebP.

    @hristo-sg,

    Thanks for the info. Questions:

    (1) As @mateuszgbiorczyk requested, can you share why SG did not load or activate the Gd library for WebP images on cPanel (Apache) servers?

    (2) If we add the .htaccess rule you provided, will that have a negative impact when migrating a website from cPanel to Site Tools (i.e., will the images transfer smoothly)?

    PS: Thanks for adding us to your migration schedule.

    Cheers!

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @hristo-sg Example of a screenshot of the configuration displayed by phpinfo() function from SG hosting:

    View post on imgur.com

    Example of correct server configuration that supports WebP for Gd library:
    https://gbiorczyk.pl/webp-converter/serverinfo.png

    Note the items marked in red.

    Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    @mateuszgbiorczyk we handl redirects on the NGINX. If image.jpg and image.jpg.webp are in the same folder, the webp file will be server. The redirect on .htaccess won’t work the way you think because the direct delivery will serve the image before any .htaccess rules are enabled. Not planing any changes on that.

    @jetxpert gd library is far from perfect way to generate webp images mildly said. That’s why it’s compiled without webp support on cPanel servers. On Site Tools we have it enabled because things are working in a much more optimized way there.

    We use the official binaries for webp generation which perform way, way better:
    https://developers.google.com/speed/webp/docs/using

    We will complete with the migrations by the end of March so image generation should work for everyone no matter what you prefer as long as images are properly placed.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @hristo-sg And if they are not in the same directory, will the .htaccess redirects work?

    Do you plan to add WebP support for Gd library? According to what I wrote in the previous message.

    @hristo-sg,

    Thanks again for the info. We respect the business and/or technical decision made by SG, but makes no sense why WebP is not loaded into the cPanel servers (efficient or not). A mute point now since all of your customers will be using Site Tools very soon.

    Cheers!

    • This reply was modified 4 years, 1 month ago by jetxpert. Reason: updated last comment to remove question (found answer)
    Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    We have focused 100% of our resources to get everyone on Site Tools. That’s why on Site Tools we’ve recompiled GD to have full webp support so people can use it if they want despite the fact it’s not the best way to do it ??

    @mateuszgbiorczyk redirect will not work since the resouce will be delivered by the NGINX Direct Delivery system before it even reaches the web server, i.e before the .htaccess is even loaded.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘server problem’ is closed to new replies.