Azamat Xodjakov
Forum Replies Created
-
Got it – changing source URLs won’t work.
But can you tell me where exactly is your plugin “redirecting” the file from original to converted? It’s gotta be referencing the converted .webp files somewhere to redirect. Can I somehow change that source destination to my cloud server?
Please, help me to change the way your plugin reaches to converted pictures.
I’m using NGINX for the server, in case it makes any difference.
@mateuszgbiorczyk, thank you for your replies!
I’m altering image URLs using wp_get_attachment_url, wp_calculate_image_srcset and wp_get_attachment_image_attributes filters. All three filters use the same function that just replaces the beginning of the URL until uploads folder like this:
function replace_with_cdn_url( $url ) { $uploads = wp_upload_dir(); return str_replace( trailingslashit( $uploads['baseurl'] ), 'https://cdn3.index.cy/wp-content/uploads/', $url ); }
Hey @mateuszgbiorczyk,
Every month I move my source files to Cloudflare R2 server. Right now only the 2024/02 folder is on my local VDS server. As soon as March starts I convert all pictures from February to webp and upload original source files to my R2 cloud server. Files are moved but all attachment records remain in my database.
For now the uploads-webpc folder files are on my local server. I want to move it to the cloud server as well. What I need is to modify your plugin so that it behaves the same way as though the uploads-webpc folder is in my local server.
Example:
My website (WordPress) location: https://index.cy
Remote original file: https://cdn3.index.cy/wp-content/uploads/2024/01/PLOT-3.jpg
Remote converted file (not functional for now): https://cdn3.index.cy/wp-content/uploads-webpc/uploads/2024/01/027d3fbf5b52ca4c09d53c7e05028698-2.jpeg.webp
Forum: Plugins
In reply to: [Contact Form 7] register_block_script_handle was called incorrectlysame notice on my website
@tobifjellner thanks for the note. I’ll take care of that asap.
I’m also having the same problem. I’m using Polylang for multilanguage feature.
I’m getting this right below the captcha in my login form:
Notice: Undefined variable: redirect_to in /var/www/shuhrat/data/www/uztea.uz/wp-content/plugins/userswp/templates/login.php on line 18
Sorry, it had nothing to do with your plugin. When I deactivated “Login with Ajax” plugin the error was gone.
Thank you.
Please, check out this screenshot: https://prntscr.com/hnffk3
It’s in the “Status” page of the plugin.Forum: Plugins
In reply to: [Send PDF for Contact Form 7] Page break in PDF?Never mind. I found it. Sorry, this plugin already had this function.
Just add[addpage]
anywhere in the document to have a page break.
Thanks.Forum: Plugins
In reply to: [WP Advanced PDF] PDF button on custom templateI made use of this code:
<?php add_query_arg ( 'format', 'pdf', get_permalink ( $post->ID ) ) ); ?>
Download PDF button is displaying fine. You may use the above code to display the PDF button anywhere in your php template. This code can be used instead of shortcode.
Just a thought: make sure your custom coded wp theme includes
wp_head();
inheader.php
andwp_footer();
in yourfooter.php
files.Forum: Plugins
In reply to: [Thumbs Rating] How to sort top rated posts by date?Thank you so much for your quick reply!
I’ve added this to the WP_Query args:
'date_query' => array( array( 'after' => '1 month ago', ) )
Now my problem is solved! Thanks again for adding new feature. Your plugin is awesome!
I have the same exact problem with CPT-onomies plugin. Any fix yet?