




{"id":160,"date":"2023-03-09T10:47:01","date_gmt":"2023-03-09T09:47:01","guid":{"rendered":"https:\/\/intranet.projektninja.com\/?p=160"},"modified":"2024-06-15T21:27:32","modified_gmt":"2024-06-15T19:27:32","slug":"webp-converter-for-media-exclude","status":"publish","type":"post","link":"https:\/\/projektninja.com\/devblog\/rozniaste\/webp-converter-for-media-exclude\/","title":{"rendered":"Jak Wykluczy\u0107 Pliki z Konwersji w &#8220;WEBP Converter for media&#8221;"},"content":{"rendered":"\n<p>Konwersja obraz\u00f3w do formatu WebP mo\u017ce czasem obni\u017cy\u0107 ich jako\u015b\u0107. Aby wykluczy\u0107 wybrane pliki z tej konwersji, mo\u017cesz doda\u0107 do nazwy pliku ko\u0144c\u00f3wk\u0119 \u201c-skipwebp\u201d. Na przyk\u0142ad, \u201cobrazek-skipwebp.png\u201d nie zostanie skonwertowany. W artykule opisano r\u00f3wnie\u017c, jak u\u017cywa\u0107 filtr\u00f3w WordPressa do bardziej zaawansowanego wykluczania. Pami\u0119taj, \u017ce obrazy dodane przez <strong>CMS<\/strong> WordPress mog\u0105 wymaga\u0107 r\u0119cznej edycji nazw plik\u00f3w.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>To exclude selected files use the following filter *(in this case with the suffix \"-skipwebp\" in a filename, e.g. image-skipwebp.png)*:\n\n`add_filter( 'webpc_supported_source_file', function( bool $status, string $file_name, string $server_path ): bool {\n    $excluded_suffix = '-skipwebp';\n    if ( strpos( $file_name, $excluded_suffix . '.' ) !== false ) {\n        return false;\n    }\n    return $status;\n}, 10, 3 );`\n\nArgument `$server_path` is the absolute server path to a directory or file. Inside the filters, you can apply more complicated rules as needed.\n\nFilters run before images are converted - they no longer support converted images. You have to delete them manually if they should not be converted.<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Chcesz wykluczy\u0107 wybrane pliki z konwersji na WebP w WordPress? Sprawd\u017a, jak doda\u0107 ko\u0144c\u00f3wk\u0119 \u201c-skipwebp\u201d do nazw plik\u00f3w i u\u017cywa\u0107 filtr\u00f3w do bardziej zaawansowanego wykluczania!<\/p>\n","protected":false},"author":1,"featured_media":698,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[275],"tags":[262,73,106,74,283,284,75,76,77,282,32,60,78,13,15,285,144],"class_list":["post-160","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rozniaste","tag-cms","tag-exclude","tag-html","tag-image","tag-jakosc-obrazu","tag-konwersja-webp","tag-next-gen","tag-optimization","tag-optymalizacja","tag-optymalizacja-obrazu","tag-php","tag-plugin","tag-webp","tag-wordpress","tag-wtyczki","tag-wykluczanie-plikow","tag-zarzadzanie-trescia"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/posts\/160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/comments?post=160"}],"version-history":[{"count":2,"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/posts\/160\/revisions"}],"predecessor-version":[{"id":699,"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/posts\/160\/revisions\/699"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/media\/698"}],"wp:attachment":[{"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/media?parent=160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/categories?post=160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/projektninja.com\/devblog\/wp-json\/wp\/v2\/tags?post=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}