Manage “skip-these-precompiled-binaries” option for cwebp
-
Hello,
Trying cwebp as converter, I got the following message:
*Output:* /my_root_path_to/wp-content/plugins/webp-express/vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/cwebp-120-linux-x86-64: /lib64/libm.so.6: version GLIBC_2.29 not found (required by /my_root_path_to/wp-content/plugins/webp-express/vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/cwebp-120-linux-x86-64) Executing cwebp binary took: 11 ms Exec failed (return code: 1) Note: You can prevent trying this precompiled binary, by setting the "skip-these-precompiled-binaries" option to "cwebp-120-linux-x86-64"
I searched where I could set and use the
skip-these-precompiled-binaries
option, but could not find it. So I started to read your code (as well as third party’s) and modified few things to get this option in cwebp configuration.
So I now share it with you, if you want to had it in a future version.To do so, after href=”https://plugins.trac.www.ads-software.com/browser/webp-express/trunk/lib/options/js/0.19.0/converters.js#L294 add:
document.getElementById('cwebp_skip_these_precompiled_binaries').value = getConverterOption(converter, 'skip-these-precompiled-binaries', '');
and after https://plugins.trac.www.ads-software.com/browser/webp-express/trunk/lib/options/js/0.19.0/converters.js#L378 add:
setConverterOption(converter, 'skip-these-precompiled-binaries', document.getElementById('cwebp_skip_these_precompiled_binaries').value);
After https://plugins.trac.www.ads-software.com/browser/webp-express/trunk/lib/options/options/conversion-options/converter-options/cwebp.php#L18 add:<div> <label for="cwebp_skip_these_precompiled_binaries">Skip these precompiled cwebp</label> <input type="text" size="40" id="cwebp_skip_these_precompiled_binaries" style="width:100%"> <br>To skip precompiled binaries that are known not to work on current system. This will cut down on conversion time. Separate values with comma. </div>
(As we are in this file, you can also correct https://plugins.trac.www.ads-software.com/browser/webp-express/trunk/lib/options/options/conversion-options/converter-options/cwebp.php#L15 as follow:
<label for="cwebp_try_supplied_binary">Try precompiled cwebp</label>
)
Finally, after “https://plugins.trac.www.ads-software.com/browser/webp-express/trunk/lib/options/submit.php#L231 add:
"skip-these-precompiled-binaries" => 'string',
…and you are good to go and set values as needed in the new “Skip these precompiled cwebp” option you now have inside cwebp configuration!And thank you for your great plugin! I really enjoy it.
- The topic ‘Manage “skip-these-precompiled-binaries” option for cwebp’ is closed to new replies.