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

    (@mateuszgbiorczyk)

    Hello @giuse,

    Thanks for your message.

    In this thread, I have replied. in your case it will be the same.

    Best,
    Mateusz

    Thread Starter Jose

    (@giuse)

    Hi @mateuszgbiorczyk

    thank you for your reply.

    I think this is the weakest point of your plugin. I suggest you add the possibility to download the original pictures. You can for example add a condition in the .htaccess file to don’t apply the rewrite rules if you add something in the URL.

    I disabled your plugin because of this issue, and until you add the possibility to download the original pictures I will not install it on any website. And honestly, I will not recommend your plugin because of this issue. Probably for you, it’s not an issue, but for me, for the user who opened the other thread, and probably for many other users it’s an issue.

    This is not to say your plugin is bad. I really think it’s wonderful apart from this serious issue. I say it because maybe it helps to improve it.
    You can also provide this feature as a premium feature, but I would think about this feature.

    If you optimize the website of someone else, and you need to optimize the original image, you want to take it from the website because you may not have other possibilities.

    Of course, this is your plugin and you decide. It already has many happy users, and I totally understand if you have no time or wish to add this feature, that as I understand you consider not really useful.

    If you don’t have the intention to add this feature, of course, mark also this thread as solved. In that case, I would have no other requests or suggestions.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @giuse I understand your point of view – however, you need to be aware that a plugin may not have all the functionalities as it will simply become sluggish and weak. I received two such reports – and the plugin is used by over 100.000 users.

    You can achieve the desired effect by using filters provided in plugins. I have prepared such a filter especially for you:

    add_filter( 'webpc_htaccess_mod_rewrite', function ( $rules ) {
    	return preg_replace(
    		'/(RewriteCond %{HTTP_ACCEPT} image\/(?:[a-z]+))/',
    		'$1' . PHP_EOL . '  RewriteCond %{QUERY_STRING} !(^|&)' . 'nocache' . ' [NC]',
    		$rules
    	);
    } );

    Add this to the functions.php file in your theme directory and save the plugin settings again.

    To display an image in its original format, add the following suffix to the URL:
    ?nocache. Does this solve your problem?

    Thread Starter Jose

    (@giuse)

    Hi @mateuszgbiorczyk

    thank you very much! I really appreciate your help.

    It doesn’t work. Maybe should I wait until you publish a new version of the plugin? Is the filter hook ‘webpc_htaccess_mod_rewrite’ already available in the current version 3.2.4?

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @giuse This filter has been around for a long time in the plugin, so you don’t have to wait for anything. Did you add it correctly?

    Could you please send me the contents of the .htaccess files generated by the plugin?

    Thread Starter Jose

    (@giuse)

    Hi @mateuszgbiorczyk

    sorry, it was my mistake. I added it correctly but it didn’t work because of the server cache. After deleting the cache it works perfectly.

    Really thank you for your great support!

    Have a lot of success with your amazing plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Not possible downloading original images’ is closed to new replies.