I’ve seemed to have managed to use ‘.webp’ images in a dev site using the ‘Community Store’ add-on!
I’ve set up using 8.5.6.
To use ‘.webp’ images in concrete5. First make you have added ‘webp’ to ‘Allowed File Types’.
NOTE: You will need to move and modify a few ‘Community Store’ files.
Move community store ‘cart.php’ to ‘application/single_pages’.
Move community store ‘cart_modal.php’ and ‘cart_list.php’ to ‘application/elements’.
In ‘application/single_pages’ create a folder ‘dashboard’ and inside that folder create a folder ’store’ and in that folder copy ‘products.php’ from ‘community/single_pages/dashboard/store’.
Then in the ‘application/single_pages/cart.php’ add style just above the ’store-cart-page’ div:
<style>
.store-cart-list-thumb img{width:80px}
</style>
In ‘application/elements/cart_modal.php’ and ‘cart_list.php’ add style:
<style>
.cart-list-thumb img{width:80px}
</style>
In ‘application/single_pages/dashboard/store/products.php’ add style to line 16:
<style>
.ccm-search-results-table .wid img{width:60px}
</style>
Then in the same file modify line 638 (approx) to accept webp file:
filters: [{field: 'file', type: '<?= \Concrete\Core\File\File::getByID($fID); ?>'}]
Then in same file add a class to the ’td’ on line 1946 (approx):
<td class="wid"><?= $product->getImageThumb(); ?></td>
NOTE: Small compromise, when adding webp files to a new product or editing an existing product page both ‘Primary’ and ‘Additional’ images do NOT show a thumbnail, just a page icon. But thumbs will show in the ‘Products’ list.
Hope that makes sense.
I have a C5 theme that’s under development, hope to put in the C5 marketplace soon, however I’ve set up a product using a webp image: Nile Sunset :: Nice Theme