• Resolved Harry

    (@dibbyo456)


    To use statically.io (free cdn) we need to have the url like this:

    https://cdn.statically.io/img/example.com/static/images/misc/clouds.jpg

    But currently the plugin does not support this type of approach.
    How can I achieve this? Filters maybe ?

Viewing 1 replies (of 1 total)
  • Thread Starter Harry

    (@dibbyo456)

    Never mind. I’ve figured it out. Need to use the as3cf_get_attachment_url filter.

    Full code:

    add_filter( 'as3cf_get_attachment_url', function( $url ) {
    	// matches http and https both.
    	$url = 'https://cdn.statically.io/img/'. preg_replace( '#^https?://#', '', $url ) .'';
    
    	return $url;
    });
    • This reply was modified 5 years, 6 months ago by Harry.
Viewing 1 replies (of 1 total)
  • The topic ‘How to use it with statically.io ?’ is closed to new replies.