Version Description
(2022-05-08) =
* [Fixed]
Calculation of number of images to be converted
* [Added]
Filter webpc_option_quality_levels
to change conversion quality levels
Download this release
Release Info
Developer | mateuszgbiorczyk |
Plugin | Converter for Media – Optimize images | Convert WebP & AVIF |
Version | 4.3.3 |
Comparing to | |
See all releases |
Code changes from version 4.3.2 to 4.3.3
- assets/build/css/styles.css +1 -1
- changelog.txt +4 -0
- readme.txt +51 -134
- src/Conversion/Cron/CronInitiator.php +9 -11
- src/Conversion/DirectoryFiles.php +20 -13
- src/Conversion/Endpoint/ImagesCounterEndpoint.php +6 -1
- src/Conversion/PathsFinder.php +4 -3
- src/Conversion/PathsValidator.php +5 -4
- src/Conversion/SkipConvertedPaths.php +18 -7
- src/Loader/LoaderIntegration.php +1 -1
- src/Service/WpCliManager.php +4 -1
- src/Settings/Option/ConversionMethodOption.php +3 -4
- src/Settings/Option/ImagesQualityOption.php +14 -8
- src/Settings/Option/OutputFormatsOption.php +3 -4
- vendor/composer/installed.php +2 -2
- webp-converter-for-media.php +1 -1
assets/build/css/styles.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:webpc-icomoon;font-style:normal;font-weight:400;src:url(../../fonts/icons/icomoon.eot?ver=15330619);src:url(../../fonts/icons/icomoon.woff?ver=15330619) format("woff"),url(../../fonts/icons/icomoon.eot?ver=15330619#iefix) format("embedded-opentype"),url(../../fonts/icons/icomoon.ttf?ver=15330619) format("truetype"),url(../../fonts/icons/icomoon.svg?ver=15330619#icomoon) format("svg")}.icon-logo:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.webpPage{color:#101517;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#00a32a;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#2271b1;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a7aaad}.webpPage__widgetTitle--error{background-color:#d63638}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#2271b1;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #c3c4c7;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #c3c4c7;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#00a32a;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}#wp-admin-bar-webpc-menu .ab-icon:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.notice[data-notice=webp-converter]{margin-top:20px;padding:0}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--gray:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#2271b1;color:#2271b1!important}.webpButton--blue.webpButton--bg,.webpButton--blue:after{background-color:#2271b1}.webpButton--blue.webpButton--bg:after{background-color:#135e96}.webpButton--green{border-color:#00a32a;color:#00a32a!important}.webpButton--green.webpButton--bg,.webpButton--green:after{background-color:#00a32a}.webpButton--green.webpButton--bg:after{background-color:#008a20}.webpButton--red{border-color:#d63638;color:#d63638!important}.webpButton--red.webpButton--bg,.webpButton--red:after{background-color:#d63638}.webpButton--red.webpButton--bg:after{background-color:#b32d2e}.webpButton--gray{border-color:#c3c4c7;color:#c3c4c7!important}.webpButton--gray.webpButton--bg,.webpButton--gray:after{background-color:#c3c4c7}.webpButton--gray.webpButton--bg:after{background-color:#a7aaad}.webpButton--bg{color:#fff!important;font-weight:400}.webpContent{padding:20px 30px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#2271b1;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p{margin-top:0}.webpInput+p{background-color:#f0f0f1;margin:0 0 10px;max-width:none;padding:14px 20px}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #c3c4c7}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#00a32a;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#00a32a;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:#dcdcde;border:1px solid #c3c4c7;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#00a32a}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;flex:1;font-size:14px;line-height:1.5714285714;margin-left:20px;max-width:650px;position:relative}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #c3c4c7!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__field[readonly]{background-color:#f0f0f1}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#d63638}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#00a32a;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#d63638}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__progress{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__progressValue{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#00a32a;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #c3c4c7;margin-top:20px}.webpLoader__errorsTitle{background-color:#c3c4c7;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#d63638;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;border:1px solid #c3c4c7;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.png);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border-left:1px solid #c3c4c7;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-family:monospace;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widget+.webpPage__widget{margin-top:40px}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #c3c4c7}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #c3c4c7;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border-left:0}}
|
1 |
+
@charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:webpc-icomoon;font-style:normal;font-weight:400;src:url(../../fonts/icons/icomoon.eot?ver=17170937);src:url(../../fonts/icons/icomoon.woff?ver=17170937) format("woff"),url(../../fonts/icons/icomoon.eot?ver=17170937#iefix) format("embedded-opentype"),url(../../fonts/icons/icomoon.ttf?ver=17170937) format("truetype"),url(../../fonts/icons/icomoon.svg?ver=17170937#icomoon) format("svg")}.icon-logo:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.webpPage{color:#101517;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#00a32a;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#2271b1;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a7aaad}.webpPage__widgetTitle--error{background-color:#d63638}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#2271b1;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #c3c4c7;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #c3c4c7;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#00a32a;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}#wp-admin-bar-webpc-menu .ab-icon:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.notice[data-notice=webp-converter]{margin-top:20px;padding:0}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--gray:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#2271b1;color:#2271b1!important}.webpButton--blue.webpButton--bg,.webpButton--blue:after{background-color:#2271b1}.webpButton--blue.webpButton--bg:after{background-color:#135e96}.webpButton--green{border-color:#00a32a;color:#00a32a!important}.webpButton--green.webpButton--bg,.webpButton--green:after{background-color:#00a32a}.webpButton--green.webpButton--bg:after{background-color:#008a20}.webpButton--red{border-color:#d63638;color:#d63638!important}.webpButton--red.webpButton--bg,.webpButton--red:after{background-color:#d63638}.webpButton--red.webpButton--bg:after{background-color:#b32d2e}.webpButton--gray{border-color:#c3c4c7;color:#c3c4c7!important}.webpButton--gray.webpButton--bg,.webpButton--gray:after{background-color:#c3c4c7}.webpButton--gray.webpButton--bg:after{background-color:#a7aaad}.webpButton--bg{color:#fff!important;font-weight:400}.webpContent{padding:20px 30px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#2271b1;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p{margin-top:0}.webpInput+p{background-color:#f0f0f1;margin:0 0 10px;max-width:none;padding:14px 20px}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #c3c4c7}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#00a32a;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#00a32a;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:#dcdcde;border:1px solid #c3c4c7;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#00a32a}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;flex:1;font-size:14px;line-height:1.5714285714;margin-left:20px;max-width:650px;position:relative}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #c3c4c7!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__field[readonly]{background-color:#f0f0f1}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#d63638}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#00a32a;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#d63638}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__progress{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__progressValue{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#00a32a;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #c3c4c7;margin-top:20px}.webpLoader__errorsTitle{background-color:#c3c4c7;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#d63638;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;border:1px solid #c3c4c7;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.png);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border-left:1px solid #c3c4c7;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-family:monospace;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widget+.webpPage__widget{margin-top:40px}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #c3c4c7}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #c3c4c7;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border-left:0}}
|
changelog.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
3 |
= 4.3.2 (2022-04-20) =
|
4 |
* `[Added]` Added conversion skip for animated GIF images
|
5 |
* `[Added]` Added new information about status of image conversion
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 4.3.3 (2022-05-08) =
|
4 |
+
* `[Fixed]` Calculation of number of images to be converted
|
5 |
+
* `[Added]` Filter `webpc_option_quality_levels` to change conversion quality levels
|
6 |
+
|
7 |
= 4.3.2 (2022-04-20) =
|
8 |
* `[Added]` Added conversion skip for animated GIF images
|
9 |
* `[Added]` Added new information about status of image conversion
|
readme.txt
CHANGED
@@ -1,44 +1,44 @@
|
|
1 |
=== WebP Converter for Media - Convert WebP and AVIF & Optimize Images ===
|
2 |
Contributors: mateuszgbiorczyk
|
3 |
Donate link: https://ko-fi.com/gbiorczyk/?utm_source=webp-converter-for-media&utm_medium=readme-donate
|
4 |
-
Tags: convert webp, webp, optimize images,
|
5 |
Requires at least: 4.9
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 7.0
|
8 |
Stable tag: trunk
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
12 |
-
Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
Speed up your website by serving WebP and AVIF images
|
17 |
|
18 |
-
After installing the plugin you do not have to do anything more. Your current images will be converted into a new format. When
|
19 |
|
20 |
-
As of today, over 90% of users use browsers that support the WebP format. The loading time of your website depends to a large extent on its weight. Using
|
21 |
|
22 |
-
This will be a profit both for your users who will not have to download so much data, but also for a server that will be less loaded. Remember that a better optimized website also affects your Google ranking.
|
23 |
|
24 |
#### AVIF support
|
25 |
|
26 |
-
Now in [the PRO version](https://mattplugins.com/products/webp-converter-for-media-pro/?utm_source=webp-converter-for-media&utm_campaign=upgrade-to-pro&utm_medium=readme-avif-support) you can use AVIF as the output format for your images. The AVIF format is a new extension - is the successor to WebP.
|
27 |
|
28 |
#### How does this work?
|
29 |
|
30 |
-
- If you have just installed the plugin, you can optimize images with one click.
|
31 |
- New images that will be added to the Media Library will be converted automatically.
|
32 |
-
- Our
|
33 |
- When the browser loads an image, our plugin checks if it supports the WebP format. If so, the image in WebP format is loaded.
|
34 |
- The plugin does not make redirects in default mode, so the URL is always the same. Only the MIME type of the image changes to `image/webp`.
|
35 |
- No redirects means no cache issues, faster and trouble-free operation of your website. If you want to know more about how it works, check out [the plugin FAQ](#faq) below.
|
36 |
- It does not matter if the image display as an `img` HTML tag or you use `background-image`. It works always!
|
37 |
- In case rewriting by rules from .htaccess file is blocked, a mode is available which loads images via PHP file. Then image URLs are changed, but the logic of operation is the same as in the case of the default mode.
|
38 |
-
- The final result is that your users download less than half of the data, and the website itself loads faster!
|
39 |
- You lose nothing - if you had to remove the plugin, it will remove everything after itself. It does not leave any trace, so you can check it with ease.
|
40 |
|
41 |
-
#### Convert WebP - it is the future!
|
42 |
|
43 |
Optimize images and raise your website to a new level now! Install the plugin and enjoy the website that loads faster by image optimization. Surely you and your users will appreciate it.
|
44 |
|
@@ -50,7 +50,7 @@ You can convert WebP and optimize images not only from `/uploads` directory but
|
|
50 |
|
51 |
We spend hours working on the development of this plugin. Technical support also requires a lot of time, but we do it because we want to offer you the best plugin. We enjoy every new plugin installation.
|
52 |
|
53 |
-
If you would like to appreciate it, you can try [the PRO version](https://mattplugins.com/products/webp-converter-for-media-pro/?utm_source=webp-converter-for-media&utm_campaign=upgrade-to-pro&utm_medium=readme-plugin-development). In addition, you will gain access to extra functionalities that will allow you to achieve **even better image
|
54 |
|
55 |
#### Please also read the FAQ below. Thank you for being with us!
|
56 |
|
@@ -256,42 +256,6 @@ To delete manually converted files, use the following action, providing as an ar
|
|
256 |
|
257 |
`do_action( 'webpc_delete_paths', $paths );`
|
258 |
|
259 |
-
= How to change .htaccess rules? =
|
260 |
-
|
261 |
-
Manually editing the rules in the .htaccess file is a task only for experienced developers. Remember that the wrong rules can cause your website to stop working.
|
262 |
-
|
263 |
-
Below is a list of filters that allow you to modify all rules. Remember that it's best to use your own rule set rather than edit parts of exists. This will ensure greater failure-free after plugin update.
|
264 |
-
|
265 |
-
Returning an empty string will delete these rules the next time you save the plugin settings. You must do this after each filter edit.
|
266 |
-
|
267 |
-
Rules for redirects: *(returns rules for `mod_rewrite` module)*:
|
268 |
-
|
269 |
-
`add_filter( 'webpc_htaccess_mod_rewrite', function( $rules, $path ) {
|
270 |
-
return '';
|
271 |
-
}, 10, 2 );`
|
272 |
-
|
273 |
-
Argument `$path` is absolute server path for `.htaccess` file *(`/wp-content/.htaccess` or `/wp-content/uploads/.htaccess`)*.
|
274 |
-
|
275 |
-
Rules for `image/webp` MIME type: *(returns rules for `mod_mime` module)*:
|
276 |
-
|
277 |
-
`add_filter( 'webpc_htaccess_mod_mime', function( $rules ) {
|
278 |
-
return '';
|
279 |
-
} );`
|
280 |
-
|
281 |
-
Rules for Browser Caching: *(returns rules for `mod_expires` module)*:
|
282 |
-
|
283 |
-
`add_filter( 'webpc_htaccess_mod_expires', function( $rules ) {
|
284 |
-
return '';
|
285 |
-
} );`
|
286 |
-
|
287 |
-
All rules from the files `/wp-content/.htaccess`, `/wp-content/uploads/.htaccess` and `/wp-content/uploads-webpc/.htaccess`: *(returns rules for modules: `mod_rewrite`, `mod_mime` and `mod_expires`)*:
|
288 |
-
|
289 |
-
`add_filter( 'webpc_htaccess_rules', function( $rules, $path ) {
|
290 |
-
return '';
|
291 |
-
}, 10, 2 );`
|
292 |
-
|
293 |
-
Argument `$path` is absolute server path for `.htaccess` file.
|
294 |
-
|
295 |
= Support for WP-CLI =
|
296 |
|
297 |
The plugin supports WP-CLI, which enables faster image conversion from the server level. More information on how to get started with WP-CLI can be found in [the Handbook](https://make.wordpress.org/cli/handbook/guides/quick-start/). The supported commands are described below.
|
@@ -310,75 +274,53 @@ Converting all images (with "Force convert all images again" option):
|
|
310 |
|
311 |
= Does plugin support CDN? =
|
312 |
|
313 |
-
|
314 |
-
|
315 |
-
The main problem when changing URLs is cache. When we modify the image URL for WebP supporting browser, then use the browser without WebP support, it will still have the URL address of an image in .webp format, because it will be in the cache.
|
316 |
-
|
317 |
-
While in the case of the `img` tag you can solve this problem, in the case of `background-image` it is possible. We wanted full support so that all images would be supported - no matter how they are displayed on the website.
|
318 |
|
319 |
-
|
320 |
-
|
321 |
-
If you are using a CDN server, find one that automatically converts images to WebP format and properly sends the correct image format to the browser.
|
322 |
-
|
323 |
-
= Configuration for Apache =
|
324 |
-
|
325 |
-
In the case of Apache, when saving the settings, .htaccess files will be generated automatically in the following locations:
|
326 |
-
- `/wp-content/.htaccess`
|
327 |
-
- `/wp-content/uploads/.htaccess`
|
328 |
-
- `/wp-content/uploads-webpc/.htaccess`
|
329 |
-
|
330 |
-
If these files are missing or empty, try disabling and re-enabling the plugin or saving the plugin settings again. Also check the write permissions of the directories where these files are located.
|
331 |
-
|
332 |
-
If your server is a combination of Apache and Nginx, remember that the image files must be supported by Apache. Only then will the redirections in the .htaccess file work properly. Alternatively, you can use the configuration for Nginx.
|
333 |
|
334 |
= Configuration for Nginx =
|
335 |
|
336 |
-
|
337 |
-
|
338 |
-
Please edit the configuration file:
|
339 |
-
- `/etc/nginx/mime.types`
|
340 |
-
|
341 |
-
and add this code line:
|
342 |
-
|
343 |
-
`types {`
|
344 |
-
` # ...`
|
345 |
-
` image/webp webp;`
|
346 |
-
` image/avif avif;`
|
347 |
-
`}`
|
348 |
|
349 |
-
|
350 |
- `/etc/nginx/sites-available/` or `/etc/nginx/sites-enabled/`
|
351 |
- `/etc/nginx/conf.d/`
|
352 |
|
353 |
-
and add
|
354 |
|
355 |
-
|
356 |
-
`
|
357 |
-
`
|
358 |
-
`
|
359 |
-
`
|
360 |
-
` }`
|
361 |
-
``
|
362 |
-
` set $ext_webp ".webp";`
|
363 |
-
` if ($http_accept !~* "image/webp") {`
|
364 |
-
` set $ext_webp "";`
|
365 |
-
` }`
|
366 |
``
|
367 |
-
`
|
368 |
-
`
|
369 |
-
`
|
370 |
-
`
|
371 |
-
` try_files`
|
372 |
-
` /wp-content/uploads-webpc/$path.$ext$ext_avif`
|
373 |
-
` /wp-content/uploads-webpc/$path.$ext$ext_webp`
|
374 |
-
` $uri =404;`
|
375 |
-
` }`
|
376 |
-
` # END WebP Converter`
|
377 |
``
|
378 |
-
`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
`}`
|
|
|
|
|
|
|
|
|
380 |
|
381 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
|
383 |
== Screenshots ==
|
384 |
|
@@ -387,6 +329,10 @@ After making changes, remember to restart the machine: `systemctl restart nginx`
|
|
387 |
|
388 |
== Changelog ==
|
389 |
|
|
|
|
|
|
|
|
|
390 |
= 4.3.2 (2022-04-20) =
|
391 |
* `[Added]` Added conversion skip for animated GIF images
|
392 |
* `[Added]` Added new information about status of image conversion
|
@@ -403,35 +349,6 @@ After making changes, remember to restart the machine: `systemctl restart nginx`
|
|
403 |
* `[Added]` Converting .webp files to AVIF format
|
404 |
* `[Added]` Support for environments where DOCUMENT_ROOT is different from WordPress installation directory
|
405 |
|
406 |
-
= 4.2.4 (2022-03-01) =
|
407 |
-
* `[Fixed]` Generating paths for via .htaccess loading mode
|
408 |
-
|
409 |
-
= 4.2.3 (2022-02-27) =
|
410 |
-
* `[Fixed]` Closing of admin notice
|
411 |
-
|
412 |
-
= 4.2.2 (2022-02-21) =
|
413 |
-
* `[Changed]` Error message for bypassing_apache error in server configuration
|
414 |
-
* `[Added]` Automatic continuation of conversion process after connection lost
|
415 |
-
* `[Added]` ICC/ICM profile support for conversion using Imagick
|
416 |
-
* `[Added]` Notification asking to clear cache for Cloudflare
|
417 |
-
|
418 |
-
= 4.2.1 (2022-02-17) =
|
419 |
-
* `[Fixed]` Cache settings for .htaccess rewrites
|
420 |
-
* `[Added]` Limit for error messages displayed while converting
|
421 |
-
* `[Added]` Support for plain permalink structure
|
422 |
-
|
423 |
-
= 4.2.0 (2022-02-13) =
|
424 |
-
* `[Removed]` Action `webpc_regenerate_all`
|
425 |
-
* `[Fixed]` Issue with plugin settings after changing Gd or Imagick library configuration
|
426 |
-
* `[Fixed]` Server configuration error detection when cURL is disabled
|
427 |
-
* `[Fixed]` URL for the server configuration tab
|
428 |
-
* `[Changed]` Automatically conversion of images after upload
|
429 |
-
* `[Changed]` Automatically conversion of images from outside the Media Library
|
430 |
-
* `[Changed]` Message for conversion error when converted file is larger than original
|
431 |
-
* `[Added]` List of allowed file extensions for cache rules in .htaccess file
|
432 |
-
* `[Added]` Status of automatic image conversion on the top bar in the WordPress Dashboard
|
433 |
-
* `[Added]` Debug information about plugin settings
|
434 |
-
|
435 |
See [changelog.txt](https://plugins.svn.wordpress.org/webp-converter-for-media/trunk/changelog.txt) for previous versions.
|
436 |
|
437 |
== Upgrade Notice ==
|
1 |
=== WebP Converter for Media - Convert WebP and AVIF & Optimize Images ===
|
2 |
Contributors: mateuszgbiorczyk
|
3 |
Donate link: https://ko-fi.com/gbiorczyk/?utm_source=webp-converter-for-media&utm_medium=readme-donate
|
4 |
+
Tags: convert webp, webp, optimize images, image optimization, compress images
|
5 |
Requires at least: 4.9
|
6 |
+
Tested up to: 6.0
|
7 |
Requires PHP: 7.0
|
8 |
Stable tag: trunk
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
12 |
+
Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image size just now by image optimization!
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
**Speed up your website using our ease image optimizer by serving WebP and AVIF images.** By replacing files in standard JPEG, PNG and GIF formats with WebP and AVIF formats, you can save over a half of the page weight without losing quality.
|
17 |
|
18 |
+
After installing the plugin you do not have to do anything more. Your current images will be converted into a new format. When image optimization by our image optimizer is finished, users will automatically receive new, much lighter images than the original ones.
|
19 |
|
20 |
+
As of today, over 90% of users use browsers that support the WebP format. The loading time of your website depends to a large extent on its weight and the level of image optimization. **Using our image optimizer, now you can and speed up it in a few seconds without much effort!**
|
21 |
|
22 |
+
This will be a profit both for your users who will not have to download so much data, but also for a server that will be less loaded. Remember that a better optimized website also affects your Google ranking. Image optimization is very important.
|
23 |
|
24 |
#### AVIF support
|
25 |
|
26 |
+
Now in [the PRO version](https://mattplugins.com/products/webp-converter-for-media-pro/?utm_source=webp-converter-for-media&utm_campaign=upgrade-to-pro&utm_medium=readme-avif-support) you can use AVIF as the output format for your images. The AVIF format is a new extension - is the successor to WebP. **AVIF allows you to achieve even higher levels of image compression**, and the quality of the converted images after image optimization is better than in WebP.
|
27 |
|
28 |
#### How does this work?
|
29 |
|
30 |
+
- If you have just installed the plugin, you can optimize images with one click. Image size will be smaller after generate webp!
|
31 |
- New images that will be added to the Media Library will be converted automatically.
|
32 |
+
- Our image optimizer does not modify your original images in any way. This means security for you and your files.
|
33 |
- When the browser loads an image, our plugin checks if it supports the WebP format. If so, the image in WebP format is loaded.
|
34 |
- The plugin does not make redirects in default mode, so the URL is always the same. Only the MIME type of the image changes to `image/webp`.
|
35 |
- No redirects means no cache issues, faster and trouble-free operation of your website. If you want to know more about how it works, check out [the plugin FAQ](#faq) below.
|
36 |
- It does not matter if the image display as an `img` HTML tag or you use `background-image`. It works always!
|
37 |
- In case rewriting by rules from .htaccess file is blocked, a mode is available which loads images via PHP file. Then image URLs are changed, but the logic of operation is the same as in the case of the default mode.
|
38 |
+
- The final result after image optimization is that your users download less than half of the data, and the website itself loads faster!
|
39 |
- You lose nothing - if you had to remove the plugin, it will remove everything after itself. It does not leave any trace, so you can check it with ease.
|
40 |
|
41 |
+
#### Convert WebP - it is the future of image optimization!
|
42 |
|
43 |
Optimize images and raise your website to a new level now! Install the plugin and enjoy the website that loads faster by image optimization. Surely you and your users will appreciate it.
|
44 |
|
50 |
|
51 |
We spend hours working on the development of this plugin. Technical support also requires a lot of time, but we do it because we want to offer you the best plugin. We enjoy every new plugin installation.
|
52 |
|
53 |
+
If you would like to appreciate it, you can try [the PRO version](https://mattplugins.com/products/webp-converter-for-media-pro/?utm_source=webp-converter-for-media&utm_campaign=upgrade-to-pro&utm_medium=readme-plugin-development). In addition, you will gain access to extra functionalities that will allow you to achieve **even better image optimization results**.
|
54 |
|
55 |
#### Please also read the FAQ below. Thank you for being with us!
|
56 |
|
256 |
|
257 |
`do_action( 'webpc_delete_paths', $paths );`
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
= Support for WP-CLI =
|
260 |
|
261 |
The plugin supports WP-CLI, which enables faster image conversion from the server level. More information on how to get started with WP-CLI can be found in [the Handbook](https://make.wordpress.org/cli/handbook/guides/quick-start/). The supported commands are described below.
|
274 |
|
275 |
= Does plugin support CDN? =
|
276 |
|
277 |
+
The website files (WordPress files) and the images from the Media Library must be on the same server. If they are, everything should work fine.
|
|
|
|
|
|
|
|
|
278 |
|
279 |
+
If only your images are on another CDN server, unfortunately correct operation is impossible, because such images are managed by another server.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
|
281 |
= Configuration for Nginx =
|
282 |
|
283 |
+
For Nginx server that does not support .htaccess rules, additional Nginx server configuration is required for the plugin to function properly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
|
285 |
+
Find the configuration file in one of the paths *(remember to select configuration file used by your vhost)*:
|
286 |
- `/etc/nginx/sites-available/` or `/etc/nginx/sites-enabled/`
|
287 |
- `/etc/nginx/conf.d/`
|
288 |
|
289 |
+
and add this code *(add these lines at the beginning of the `server { ... }` block)*:
|
290 |
|
291 |
+
`# BEGIN WebP Converter for Media`
|
292 |
+
`set $ext_avif ".avif";`
|
293 |
+
`if ($http_accept !~* "image/avif") {`
|
294 |
+
` set $ext_avif "";`
|
295 |
+
`}`
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
``
|
297 |
+
`set $ext_webp ".webp";`
|
298 |
+
`if ($http_accept !~* "image/webp") {`
|
299 |
+
` set $ext_webp "";`
|
300 |
+
`}`
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
``
|
302 |
+
`location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif|webp)$ {`
|
303 |
+
` add_header Vary Accept;`
|
304 |
+
` add_header Cache-Control "private" always;`
|
305 |
+
` expires 365d;`
|
306 |
+
` try_files`
|
307 |
+
` /wp-content/uploads-webpc/$path.$ext$ext_avif`
|
308 |
+
` /wp-content/uploads-webpc/$path.$ext$ext_webp`
|
309 |
+
` $uri =404;`
|
310 |
`}`
|
311 |
+
`# END WebP Converter for Media`
|
312 |
+
|
313 |
+
Then edit the configuration file:
|
314 |
+
- `/etc/nginx/mime.types`
|
315 |
|
316 |
+
and add this code *(add these lines inside the `types { ... }` block)*:
|
317 |
+
|
318 |
+
`image/webp webp;`
|
319 |
+
`image/avif avif;`
|
320 |
+
|
321 |
+
After making changes, remember to restart the machine:
|
322 |
+
|
323 |
+
`systemctl restart nginx`
|
324 |
|
325 |
== Screenshots ==
|
326 |
|
329 |
|
330 |
== Changelog ==
|
331 |
|
332 |
+
= 4.3.3 (2022-05-08) =
|
333 |
+
* `[Fixed]` Calculation of number of images to be converted
|
334 |
+
* `[Added]` Filter `webpc_option_quality_levels` to change conversion quality levels
|
335 |
+
|
336 |
= 4.3.2 (2022-04-20) =
|
337 |
* `[Added]` Added conversion skip for animated GIF images
|
338 |
* `[Added]` Added new information about status of image conversion
|
349 |
* `[Added]` Converting .webp files to AVIF format
|
350 |
* `[Added]` Support for environments where DOCUMENT_ROOT is different from WordPress installation directory
|
351 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
See [changelog.txt](https://plugins.svn.wordpress.org/webp-converter-for-media/trunk/changelog.txt) for previous versions.
|
353 |
|
354 |
== Upgrade Notice ==
|
src/Conversion/Cron/CronInitiator.php
CHANGED
@@ -28,11 +28,6 @@ class CronInitiator {
|
|
28 |
*/
|
29 |
private $cron_status_manager;
|
30 |
|
31 |
-
/**
|
32 |
-
* @var bool
|
33 |
-
*/
|
34 |
-
private $cron_enabled;
|
35 |
-
|
36 |
public function __construct(
|
37 |
PluginData $plugin_data,
|
38 |
TokenRepository $token_repository,
|
@@ -41,9 +36,6 @@ class CronInitiator {
|
|
41 |
$this->plugin_data = $plugin_data;
|
42 |
$this->token_repository = $token_repository;
|
43 |
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
44 |
-
|
45 |
-
$plugin_settings = $this->plugin_data->get_plugin_settings();
|
46 |
-
$this->cron_enabled = in_array( ExtraFeaturesOption::OPTION_VALUE_CRON_ENABLED, $plugin_settings[ ExtraFeaturesOption::OPTION_NAME ] );
|
47 |
}
|
48 |
|
49 |
public function refresh_paths_to_conversion( bool $force_init = false ): bool {
|
@@ -53,11 +45,14 @@ class CronInitiator {
|
|
53 |
return false;
|
54 |
}
|
55 |
|
|
|
|
|
|
|
56 |
$this->cron_status_manager->set_conversion_status_locked( true, true );
|
57 |
|
58 |
$paths = ( new PathsFinder( $this->plugin_data, $this->token_repository ) )->get_paths( true );
|
59 |
-
$this->cron_status_manager->set_paths_to_conversion( $paths, $
|
60 |
-
$this->cron_status_manager->set_paths_skipped( ( $
|
61 |
|
62 |
$this->cron_status_manager->set_conversion_status_locked( false );
|
63 |
|
@@ -116,8 +111,11 @@ class CronInitiator {
|
|
116 |
* @return void
|
117 |
*/
|
118 |
private function try_restart_conversion() {
|
|
|
|
|
|
|
119 |
$this->cron_status_manager->reset_conversion_request_id();
|
120 |
-
if ( ! $
|
121 |
return;
|
122 |
}
|
123 |
|
28 |
*/
|
29 |
private $cron_status_manager;
|
30 |
|
|
|
|
|
|
|
|
|
|
|
31 |
public function __construct(
|
32 |
PluginData $plugin_data,
|
33 |
TokenRepository $token_repository,
|
36 |
$this->plugin_data = $plugin_data;
|
37 |
$this->token_repository = $token_repository;
|
38 |
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
public function refresh_paths_to_conversion( bool $force_init = false ): bool {
|
45 |
return false;
|
46 |
}
|
47 |
|
48 |
+
$plugin_settings = $this->plugin_data->get_plugin_settings();
|
49 |
+
$cron_enabled = in_array( ExtraFeaturesOption::OPTION_VALUE_CRON_ENABLED, $plugin_settings[ ExtraFeaturesOption::OPTION_NAME ] );
|
50 |
+
|
51 |
$this->cron_status_manager->set_conversion_status_locked( true, true );
|
52 |
|
53 |
$paths = ( new PathsFinder( $this->plugin_data, $this->token_repository ) )->get_paths( true );
|
54 |
+
$this->cron_status_manager->set_paths_to_conversion( $paths, $cron_enabled );
|
55 |
+
$this->cron_status_manager->set_paths_skipped( ( $cron_enabled ) ? $paths : [] );
|
56 |
|
57 |
$this->cron_status_manager->set_conversion_status_locked( false );
|
58 |
|
111 |
* @return void
|
112 |
*/
|
113 |
private function try_restart_conversion() {
|
114 |
+
$plugin_settings = $this->plugin_data->get_plugin_settings();
|
115 |
+
$cron_enabled = in_array( ExtraFeaturesOption::OPTION_VALUE_CRON_ENABLED, $plugin_settings[ ExtraFeaturesOption::OPTION_NAME ] );
|
116 |
+
|
117 |
$this->cron_status_manager->reset_conversion_request_id();
|
118 |
+
if ( ! $cron_enabled || ! $this->cron_status_manager->get_paths_counter() ) {
|
119 |
return;
|
120 |
}
|
121 |
|
src/Conversion/DirectoryFiles.php
CHANGED
@@ -33,20 +33,21 @@ class DirectoryFiles implements HookableInterface {
|
|
33 |
* {@inheritdoc}
|
34 |
*/
|
35 |
public function init_hooks() {
|
36 |
-
add_filter( 'webpc_dir_files', [ $this, 'get_files_by_directory' ], 10,
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
* Returns list of source images for directory.
|
41 |
*
|
42 |
-
* @param string[]
|
43 |
-
* @param string
|
44 |
-
* @param bool
|
|
|
45 |
*
|
46 |
* @return string[] Server paths of source images.
|
47 |
* @internal
|
48 |
*/
|
49 |
-
public function get_files_by_directory( array $value, string $dir_path, bool $skip_converted = false ): array {
|
50 |
if ( ! file_exists( $dir_path ) ) {
|
51 |
return $value;
|
52 |
}
|
@@ -55,19 +56,25 @@ class DirectoryFiles implements HookableInterface {
|
|
55 |
$this->server_configurator->set_execution_time( 900 );
|
56 |
|
57 |
$settings = $this->plugin_data->get_plugin_settings();
|
58 |
-
return $this->find_files_in_directory(
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
/**
|
62 |
* Returns list of source images for directory.
|
63 |
*
|
64 |
-
* @param string
|
65 |
-
* @param string[]
|
66 |
-
* @param bool
|
|
|
67 |
*
|
68 |
* @return string[] Server paths of source images.
|
69 |
*/
|
70 |
-
private function find_files_in_directory( string $dir_path, array $
|
71 |
$paths = scandir( $dir_path );
|
72 |
$list = [];
|
73 |
if ( ! is_array( $paths ) ) {
|
@@ -78,10 +85,10 @@ class DirectoryFiles implements HookableInterface {
|
|
78 |
$current_path = $dir_path . '/' . urlencode( $path ); // phpcs:ignore
|
79 |
if ( is_dir( $current_path ) ) {
|
80 |
if ( $this->is_supported_source_directory( $current_path ) ) {
|
81 |
-
$list = array_merge( $list, $this->find_files_in_directory( $current_path, $
|
82 |
}
|
83 |
-
} elseif ( in_array( strtolower( pathinfo( $current_path, PATHINFO_EXTENSION ) ), $
|
84 |
-
if ( $this->is_supported_source_file( $current_path, $skip_converted ) ) {
|
85 |
$list[] = $current_path;
|
86 |
}
|
87 |
}
|
33 |
* {@inheritdoc}
|
34 |
*/
|
35 |
public function init_hooks() {
|
36 |
+
add_filter( 'webpc_dir_files', [ $this, 'get_files_by_directory' ], 10, 4 );
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
* Returns list of source images for directory.
|
41 |
*
|
42 |
+
* @param string[] $value Server paths of source images.
|
43 |
+
* @param string $dir_path Server path of source directory.
|
44 |
+
* @param bool $skip_converted Skip images already converted?
|
45 |
+
* @param string[]|null $allowed_output_formats List of extensions or use selected in plugin settings.
|
46 |
*
|
47 |
* @return string[] Server paths of source images.
|
48 |
* @internal
|
49 |
*/
|
50 |
+
public function get_files_by_directory( array $value, string $dir_path, bool $skip_converted = false, array $allowed_output_formats = null ): array {
|
51 |
if ( ! file_exists( $dir_path ) ) {
|
52 |
return $value;
|
53 |
}
|
56 |
$this->server_configurator->set_execution_time( 900 );
|
57 |
|
58 |
$settings = $this->plugin_data->get_plugin_settings();
|
59 |
+
return $this->find_files_in_directory(
|
60 |
+
$dir_path,
|
61 |
+
$settings[ SupportedExtensionsOption::OPTION_NAME ],
|
62 |
+
$skip_converted,
|
63 |
+
$allowed_output_formats
|
64 |
+
);
|
65 |
}
|
66 |
|
67 |
/**
|
68 |
* Returns list of source images for directory.
|
69 |
*
|
70 |
+
* @param string $dir_path Server path of source directory.
|
71 |
+
* @param string[] $allowed_source_exts File extensions to find.
|
72 |
+
* @param bool $skip_converted Skip images already converted?
|
73 |
+
* @param string[]|null $allowed_output_formats List of extensions or use selected in plugin settings.
|
74 |
*
|
75 |
* @return string[] Server paths of source images.
|
76 |
*/
|
77 |
+
private function find_files_in_directory( string $dir_path, array $allowed_source_exts, bool $skip_converted, array $allowed_output_formats = null ): array {
|
78 |
$paths = scandir( $dir_path );
|
79 |
$list = [];
|
80 |
if ( ! is_array( $paths ) ) {
|
85 |
$current_path = $dir_path . '/' . urlencode( $path ); // phpcs:ignore
|
86 |
if ( is_dir( $current_path ) ) {
|
87 |
if ( $this->is_supported_source_directory( $current_path ) ) {
|
88 |
+
$list = array_merge( $list, $this->find_files_in_directory( $current_path, $allowed_source_exts, $skip_converted, $allowed_output_formats ) );
|
89 |
}
|
90 |
+
} elseif ( in_array( strtolower( pathinfo( $current_path, PATHINFO_EXTENSION ) ), $allowed_source_exts ) ) {
|
91 |
+
if ( $this->is_supported_source_file( $current_path, $skip_converted, $allowed_output_formats ) ) {
|
92 |
$list[] = $current_path;
|
93 |
}
|
94 |
}
|
src/Conversion/Endpoint/ImagesCounterEndpoint.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WebpConverter\Conversion\Endpoint;
|
4 |
|
|
|
|
|
5 |
use WebpConverter\Conversion\PathsFinder;
|
6 |
use WebpConverter\PluginData;
|
7 |
use WebpConverter\Repository\TokenRepository;
|
@@ -48,7 +50,10 @@ class ImagesCounterEndpoint extends EndpointAbstract {
|
|
48 |
* {@inheritdoc}
|
49 |
*/
|
50 |
public function get_route_response( \WP_REST_Request $request ) {
|
51 |
-
$images_count = count(
|
|
|
|
|
|
|
52 |
$this->stats_manager->set_calculation_images_count( $images_count );
|
53 |
|
54 |
return new \WP_REST_Response(
|
2 |
|
3 |
namespace WebpConverter\Conversion\Endpoint;
|
4 |
|
5 |
+
use WebpConverter\Conversion\Format\AvifFormat;
|
6 |
+
use WebpConverter\Conversion\Format\WebpFormat;
|
7 |
use WebpConverter\Conversion\PathsFinder;
|
8 |
use WebpConverter\PluginData;
|
9 |
use WebpConverter\Repository\TokenRepository;
|
50 |
* {@inheritdoc}
|
51 |
*/
|
52 |
public function get_route_response( \WP_REST_Request $request ) {
|
53 |
+
$images_count = count(
|
54 |
+
( new PathsFinder( $this->plugin_data, $this->token_repository ) )
|
55 |
+
->get_paths( true, [ AvifFormat::FORMAT_EXTENSION, WebpFormat::FORMAT_EXTENSION ] )
|
56 |
+
);
|
57 |
$this->stats_manager->set_calculation_images_count( $images_count );
|
58 |
|
59 |
return new \WP_REST_Response(
|
src/Conversion/PathsFinder.php
CHANGED
@@ -64,11 +64,12 @@ class PathsFinder {
|
|
64 |
/**
|
65 |
* Returns list of server paths of source images to be converted.
|
66 |
*
|
67 |
-
* @param bool
|
|
|
68 |
*
|
69 |
* @return string[] Server paths of source images.
|
70 |
*/
|
71 |
-
public function get_paths( bool $skip_converted = false ): array {
|
72 |
$settings = $this->plugin_data->get_plugin_settings();
|
73 |
$dirs = array_filter(
|
74 |
array_map(
|
@@ -81,7 +82,7 @@ class PathsFinder {
|
|
81 |
|
82 |
$list = [];
|
83 |
foreach ( $dirs as $dir_path ) {
|
84 |
-
$paths = apply_filters( 'webpc_dir_files', [], $dir_path, $skip_converted );
|
85 |
$list = array_merge( $list, $paths );
|
86 |
}
|
87 |
|
64 |
/**
|
65 |
* Returns list of server paths of source images to be converted.
|
66 |
*
|
67 |
+
* @param bool $skip_converted Skip converted images?
|
68 |
+
* @param string[]|null $allowed_output_formats List of extensions or use selected in plugin settings.
|
69 |
*
|
70 |
* @return string[] Server paths of source images.
|
71 |
*/
|
72 |
+
public function get_paths( bool $skip_converted = false, array $allowed_output_formats = null ): array {
|
73 |
$settings = $this->plugin_data->get_plugin_settings();
|
74 |
$dirs = array_filter(
|
75 |
array_map(
|
82 |
|
83 |
$list = [];
|
84 |
foreach ( $dirs as $dir_path ) {
|
85 |
+
$paths = apply_filters( 'webpc_dir_files', [], $dir_path, $skip_converted, $allowed_output_formats );
|
86 |
$list = array_merge( $list, $paths );
|
87 |
}
|
88 |
|
src/Conversion/PathsValidator.php
CHANGED
@@ -8,16 +8,17 @@ namespace WebpConverter\Conversion;
|
|
8 |
trait PathsValidator {
|
9 |
|
10 |
/**
|
11 |
-
* @param string
|
12 |
-
* @param bool
|
|
|
13 |
*/
|
14 |
-
public function is_supported_source_file( string $file_path, bool $skip_converted = false ): bool {
|
15 |
if ( ! $this->is_supported_source_directory( dirname( $file_path ) ) ) {
|
16 |
return false;
|
17 |
}
|
18 |
|
19 |
$server_path = $this->convert_server_path( $file_path );
|
20 |
-
return apply_filters( 'webpc_supported_source_file', true, basename( $server_path ), $server_path, $skip_converted );
|
21 |
}
|
22 |
|
23 |
public function is_supported_source_directory( string $directory_path ): bool {
|
8 |
trait PathsValidator {
|
9 |
|
10 |
/**
|
11 |
+
* @param string $file_path .
|
12 |
+
* @param bool $skip_converted Skip images already converted?
|
13 |
+
* @param string[]|null $allowed_output_formats List of extensions or use selected in plugin settings.
|
14 |
*/
|
15 |
+
public function is_supported_source_file( string $file_path, bool $skip_converted = false, array $allowed_output_formats = null ): bool {
|
16 |
if ( ! $this->is_supported_source_directory( dirname( $file_path ) ) ) {
|
17 |
return false;
|
18 |
}
|
19 |
|
20 |
$server_path = $this->convert_server_path( $file_path );
|
21 |
+
return apply_filters( 'webpc_supported_source_file', true, basename( $server_path ), $server_path, $skip_converted, $allowed_output_formats );
|
22 |
}
|
23 |
|
24 |
public function is_supported_source_directory( string $directory_path ): bool {
|
src/Conversion/SkipConvertedPaths.php
CHANGED
@@ -31,24 +31,35 @@ class SkipConvertedPaths implements HookableInterface {
|
|
31 |
* {@inheritdoc}
|
32 |
*/
|
33 |
public function init_hooks() {
|
34 |
-
add_filter( 'webpc_supported_source_file', [ $this, 'skip_converted_path' ], 0,
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
* Returns the status if the given file path should be converted.
|
39 |
*
|
40 |
-
* @param bool
|
41 |
-
* @param string
|
42 |
-
* @param string
|
43 |
-
* @param bool
|
|
|
44 |
*
|
45 |
* @return bool Status if the given path should be converted.
|
46 |
* @internal
|
47 |
*/
|
48 |
-
public function skip_converted_path(
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
$this->extensions = $this->extensions ?: $this->get_output_extensions();
|
50 |
$directory = new OutputPath();
|
51 |
-
$output_paths = $directory->get_paths(
|
|
|
|
|
|
|
|
|
52 |
|
53 |
if ( $this->has_crashed_paths( $output_paths )
|
54 |
|| ( $skip_converted && $this->has_converted_paths( $output_paths ) ) ) {
|
31 |
* {@inheritdoc}
|
32 |
*/
|
33 |
public function init_hooks() {
|
34 |
+
add_filter( 'webpc_supported_source_file', [ $this, 'skip_converted_path' ], 0, 5 );
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
* Returns the status if the given file path should be converted.
|
39 |
*
|
40 |
+
* @param bool $path_status .
|
41 |
+
* @param string $filename .
|
42 |
+
* @param string $server_path .
|
43 |
+
* @param bool $skip_converted Skip images already converted?
|
44 |
+
* @param string[]|null $allowed_output_formats List of extensions or use selected in plugin settings.
|
45 |
*
|
46 |
* @return bool Status if the given path should be converted.
|
47 |
* @internal
|
48 |
*/
|
49 |
+
public function skip_converted_path(
|
50 |
+
bool $path_status,
|
51 |
+
string $filename,
|
52 |
+
string $server_path,
|
53 |
+
bool $skip_converted,
|
54 |
+
array $allowed_output_formats = null
|
55 |
+
): bool {
|
56 |
$this->extensions = $this->extensions ?: $this->get_output_extensions();
|
57 |
$directory = new OutputPath();
|
58 |
+
$output_paths = $directory->get_paths(
|
59 |
+
urldecode( $server_path ),
|
60 |
+
false,
|
61 |
+
( $allowed_output_formats === null ) ? $this->extensions : $allowed_output_formats
|
62 |
+
);
|
63 |
|
64 |
if ( $this->has_crashed_paths( $output_paths )
|
65 |
|| ( $skip_converted && $this->has_converted_paths( $output_paths ) ) ) {
|
src/Loader/LoaderIntegration.php
CHANGED
@@ -24,7 +24,7 @@ class LoaderIntegration implements HookableInterface {
|
|
24 |
* {@inheritdoc}
|
25 |
*/
|
26 |
public function init_hooks() {
|
27 |
-
add_action( '
|
28 |
add_action( LoaderAbstract::ACTION_NAME, [ $this, 'refresh_loader' ], 10, 2 );
|
29 |
}
|
30 |
|
24 |
* {@inheritdoc}
|
25 |
*/
|
26 |
public function init_hooks() {
|
27 |
+
add_action( 'init', [ $this, 'load_loader_actions' ] );
|
28 |
add_action( LoaderAbstract::ACTION_NAME, [ $this, 'refresh_loader' ], 10, 2 );
|
29 |
}
|
30 |
|
src/Service/WpCliManager.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WebpConverter\Service;
|
4 |
|
|
|
|
|
5 |
use WebpConverter\Conversion\Method\MethodIntegrator;
|
6 |
use WebpConverter\Conversion\PathsFinder;
|
7 |
use WebpConverter\HookableInterface;
|
@@ -51,7 +53,8 @@ class WpCliManager implements HookableInterface {
|
|
51 |
);
|
52 |
|
53 |
$images_count = count(
|
54 |
-
( new PathsFinder( $this->plugin_data, $this->token_repository ) )
|
|
|
55 |
);
|
56 |
|
57 |
\WP_CLI::success(
|
2 |
|
3 |
namespace WebpConverter\Service;
|
4 |
|
5 |
+
use WebpConverter\Conversion\Format\AvifFormat;
|
6 |
+
use WebpConverter\Conversion\Format\WebpFormat;
|
7 |
use WebpConverter\Conversion\Method\MethodIntegrator;
|
8 |
use WebpConverter\Conversion\PathsFinder;
|
9 |
use WebpConverter\HookableInterface;
|
53 |
);
|
54 |
|
55 |
$images_count = count(
|
56 |
+
( new PathsFinder( $this->plugin_data, $this->token_repository ) )
|
57 |
+
->get_paths( true, [ AvifFormat::FORMAT_EXTENSION, WebpFormat::FORMAT_EXTENSION ] )
|
58 |
);
|
59 |
|
60 |
\WP_CLI::success(
|
src/Settings/Option/ConversionMethodOption.php
CHANGED
@@ -58,11 +58,10 @@ class ConversionMethodOption extends OptionAbstract {
|
|
58 |
return [
|
59 |
__( 'The Remote server allows you to reduce the server load, because your images are converted by our server. This option is also useful when the server does not meet all of the plugin\'s technical requirements.', 'webp-converter-for-media' ),
|
60 |
sprintf(
|
61 |
-
/* translators: %1$s: open anchor tag, %2$s:
|
62 |
-
__( '%1$
|
63 |
'<a href="' . esc_url( sprintf( WebpConverterConstants::UPGRADE_PRO_PREFIX_URL, 'field-conversion-method-info' ) ) . '" target="_blank">',
|
64 |
-
'<span class="dashicons dashicons-arrow-right-alt"></span>'
|
65 |
-
'</a>'
|
66 |
),
|
67 |
];
|
68 |
}
|
58 |
return [
|
59 |
__( 'The Remote server allows you to reduce the server load, because your images are converted by our server. This option is also useful when the server does not meet all of the plugin\'s technical requirements.', 'webp-converter-for-media' ),
|
60 |
sprintf(
|
61 |
+
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
62 |
+
__( '%1$sUpgrade to PRO%2$s', 'webp-converter-for-media' ),
|
63 |
'<a href="' . esc_url( sprintf( WebpConverterConstants::UPGRADE_PRO_PREFIX_URL, 'field-conversion-method-info' ) ) . '" target="_blank">',
|
64 |
+
'<span class="dashicons dashicons-arrow-right-alt"></span>' . '</a>'
|
|
|
65 |
),
|
66 |
];
|
67 |
}
|
src/Settings/Option/ImagesQualityOption.php
CHANGED
@@ -50,14 +50,20 @@ class ImagesQualityOption extends OptionAbstract {
|
|
50 |
* @return string[]
|
51 |
*/
|
52 |
public function get_values( array $settings ): array {
|
53 |
-
|
54 |
-
'
|
55 |
-
'
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
/**
|
50 |
* @return string[]
|
51 |
*/
|
52 |
public function get_values( array $settings ): array {
|
53 |
+
$levels = apply_filters(
|
54 |
+
'webpc_option_quality_levels',
|
55 |
+
[ '75', '80', '85', '90', '95', '100' ]
|
56 |
+
);
|
57 |
+
|
58 |
+
$values = [];
|
59 |
+
foreach ( $levels as $level ) {
|
60 |
+
$level_value = (int) $level;
|
61 |
+
if ( ( $level_value > 0 ) && ( $level_value <= 100 ) ) {
|
62 |
+
$values[ $level_value ] = sprintf( '%s%%', $level_value );
|
63 |
+
}
|
64 |
+
}
|
65 |
+
ksort( $values );
|
66 |
+
return $values;
|
67 |
}
|
68 |
|
69 |
/**
|
src/Settings/Option/OutputFormatsOption.php
CHANGED
@@ -66,11 +66,10 @@ class OutputFormatsOption extends OptionAbstract {
|
|
66 |
return [
|
67 |
__( 'The AVIF format is a new extension - is the successor to WebP. It allows you to achieve even higher levels of image compression, and the quality of the converted images is better than in WebP.', 'webp-converter-for-media' ),
|
68 |
sprintf(
|
69 |
-
/* translators: %1$s: open anchor tag, %2$s:
|
70 |
-
__( '%1$
|
71 |
'<a href="' . esc_url( sprintf( WebpConverterConstants::UPGRADE_PRO_PREFIX_URL, 'field-output-formats-info' ) ) . '" target="_blank">',
|
72 |
-
'<span class="dashicons dashicons-arrow-right-alt"></span>'
|
73 |
-
'</a>'
|
74 |
),
|
75 |
];
|
76 |
}
|
66 |
return [
|
67 |
__( 'The AVIF format is a new extension - is the successor to WebP. It allows you to achieve even higher levels of image compression, and the quality of the converted images is better than in WebP.', 'webp-converter-for-media' ),
|
68 |
sprintf(
|
69 |
+
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
70 |
+
__( '%1$sUpgrade to PRO%2$s', 'webp-converter-for-media' ),
|
71 |
'<a href="' . esc_url( sprintf( WebpConverterConstants::UPGRADE_PRO_PREFIX_URL, 'field-output-formats-info' ) ) . '" target="_blank">',
|
72 |
+
'<span class="dashicons dashicons-arrow-right-alt"></span>' . '</a>'
|
|
|
73 |
),
|
74 |
];
|
75 |
}
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'gbiorczyk/webp-converter-for-media',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -16,7 +16,7 @@
|
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'matt-plugins/deactivation-modal' => array(
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '1ada0595318ad8b74f8e239a72018a254d392f08',
|
9 |
'name' => 'gbiorczyk/webp-converter-for-media',
|
10 |
'dev' => false,
|
11 |
),
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => '1ada0595318ad8b74f8e239a72018a254d392f08',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'matt-plugins/deactivation-modal' => array(
|
webp-converter-for-media.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Plugin Name: WebP Converter for Media
|
5 |
* Description: Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image sizes just now!
|
6 |
-
* Version: 4.3.
|
7 |
* Author: Mateusz Gbiorczyk
|
8 |
* Author URI: https://mattplugins.com/
|
9 |
* Text Domain: webp-converter-for-media
|
3 |
/**
|
4 |
* Plugin Name: WebP Converter for Media
|
5 |
* Description: Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image sizes just now!
|
6 |
+
* Version: 4.3.3
|
7 |
* Author: Mateusz Gbiorczyk
|
8 |
* Author URI: https://mattplugins.com/
|
9 |
* Text Domain: webp-converter-for-media
|