create_htaccess(); } public function create_htaccess() { $htaccess_file= WP_CONTENT_DIR."/compressx-nextgen/.htaccess"; $line[]=''; $line[]='AddType image/avif .avif'; $line[]='AddType image/webp .webp'; $line[]=''; $line[]=''; $line[]='ExpiresActive On'; $line[]='ExpiresByType image/avif "access plus 1 year"'; $line[]='ExpiresByType image/webp "access plus 1 year"'; $line[]=''; $line[]='Options -Indexes'; insert_with_markers($htaccess_file,'CompressX Webp',$line); } }