Files created in uploads folder
-
Hi there,
I am using a bedrock setup for wordpress and use the following filters to point to the correct directories:add_filter('webpc_uploads_path', function($path) { return '../app/uploads/'; });
This ‘webpc_uploads_path’ works as expected and the warning I had went away.
But the following one does not seem to work. The files get created in the ‘uploads’ folder and not the ‘uploads-webpc’ folder.
add_filter('webpc_uploads_webp', function($path) { return '../app/uploads-webpc/'; });
In the .htaccess file the section looks like this:
# BEGIN WebP Converter <IfModule mod_mime.c> AddType image/webp .webp </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp/../app/uploads-webpc/$1.jpg.webp -f RewriteRule ../app/uploads/(.+)\.jpg$ ../app/uploads-webpc/$1.jpg.webp [T=image/webp] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp/../app/uploads-webpc/$1.jpeg.webp -f RewriteRule ../app/uploads/(.+)\.jpeg$ ../app/uploads-webpc/$1.jpeg.webp [T=image/webp] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp/../app/uploads-webpc/$1.png.webp -f RewriteRule ../app/uploads/(.+)\.png$ ../app/uploads-webpc/$1.png.webp [T=image/webp] </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/webp "access plus 1 year" </IfModule> # END WebP Converter
Maybe we need a filter to define ABSPATH in a different way, so I do not need to use the ../? My webrooot is web. ABSPATH will point to web/wp/. But my uploads folder is in web/app/
web /app /uploads /plugins /themes ... /wp /wp-admin ...
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘Files created in uploads folder’ is closed to new replies.