• Resolved richbitl

    (@richbitl)


    Hi, two questions.
    I think I must’ve used your plugin before as I have an uploads-webpc folder containing webp versions of most of my pictures – but the plugin is now uninstalled. I need to replace a few images that are used across the website that still seem to be served as webp images (according to site inspector).

    1. I’m thinking of replacing the exact same webp image (keeping same file format and name) and dropping it into the relevant folder in uploads-webpc folder? would that work and not break anything?

    2. Given the plugin’s now uninstalled, is it ok to simply delete the uploads-webpc folder and will that then serve the original pictures?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hello @richbitl,

    Thanks for your message.

    1. Why do you want to do that? Just start converting all images by selecting “Force the conversion of all images again”. This is the simplest solution.

    2. If you uninstall a plugin via the WordPress Admin Dashboard, using the “Delete” button in the plugins list, the plugin will delete all files one by one.

    Best,
    Mateusz

    Thread Starter richbitl

    (@richbitl)

    Thanks lots for your quick reply.

    1. As mentioned, the plugin was uninstalled some time ago. I need to replace an advertising image that appears about 100 times on the website. I replaced the jpg version of the image using ftp into the regular upload folder but that didnt work, i think because its actually serving webp images from the uploads-webpc folder. So i’d like to know if i replace the image in there, do you think it will ipdate the images across my site?

    2. The plugin is already uninstalled but the webp folder (uploads-webpc) is still there. Do you think i can manually delete the folder using ftp?

    Thanks

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Thanks for your answer @richbitl,

    1. If you disabled the plugin, the rules in the .htaccess file were also removed, so the plugin does not work.

    2. How did you remove the plugin? Via the WordPress panel or via FTP? It is best if you remove the /uploads-webpc directory. Also clear the contents of the .htaccess files in the /wp-content and /wp-content/uploads directory.

    Best,
    Mateusz

    Thread Starter richbitl

    (@richbitl)

    TBH I’ve no idea how or when the plugin was removed!

    So i’ll remove the uploads-webpc directory as you suggest. Here’s the entries in the .htaccess files. Sorry, I’ve never edited these before – do i literally just delete the obvious WebP converter entries (WHERE I’VE MARKED IN CAPS) and save the empty files out?

    In wp-content/uploads folder:

    DELETE FROM HERE>>
    # BEGIN WebP Converter
    # ! — DO NOT EDIT PREVIOUS LINE — !
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.jpg.webp -f
    RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.*
    RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/uploads/$1.jpg.webp [NC,T=image/webp,L]
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.jpeg.webp -f
    RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.*
    RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/uploads/$1.jpeg.webp [NC,T=image/webp,L]
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.png.webp -f
    RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.*
    RewriteRule (.+)\.png$ /wp-content/uploads-webpc/uploads/$1.png.webp [NC,T=image/webp,L]
    </IfModule>
    <IfModule mod_headers.c>
    Header always set Cache-Control “private”
    </IfModule>
    # ! — DO NOT EDIT NEXT LINE — !
    # END WebP Converter <<DELETE TO HERE

    <Files *.php>
    deny from all
    </Files>

    # BEGIN Wordfence code execution protection
    <IfModule mod_php5.c>
    php_flag engine 0
    </IfModule>
    <IfModule mod_php7.c>
    php_flag engine 0
    </IfModule>

    AddHandler cgi-script .php .phtml .php3 .pl .py .jsp .asp .htm .shtml .sh .cgi
    Options -ExecCGI
    # END Wordfence code execution protection`

    in wp-content folder:

    ALSO DELETE FROM HERE>>`# BEGIN WebP Converter
    # ! — DO NOT EDIT PREVIOUS LINE — !
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpg.webp -f
    RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.*
    RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/$1.jpg.webp [NC,T=image/webp,L]
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpeg.webp -f
    RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.*
    RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,L]
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.png.webp -f
    RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.*
    RewriteRule (.+)\.png$ /wp-content/uploads-webpc/$1.png.webp [NC,T=image/webp,L]
    </IfModule>
    # ! — DO NOT EDIT NEXT LINE — !
    # END WebP Converter<<DELETE TO HERE

    <Files *.php>
    deny from all
    </Files>
    # BEGIN All_404_marker_comment_image
    # END All_404_marker_comment_image`

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @richbitl Yes, that’s right. You should remove these items.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to replace an image by ftp?’ is closed to new replies.