Jump to content

Ibrahim

Members
  • Posts

    1
  • Joined

  • Last visited

Ibrahim's Achievements

Starter

Starter (1/6)

0

Reputation

  1. as my website is providing sport news articles, so i have made few changes over the templates for main article page i have added teh following : <?php $port = $pages->find("template=bns-article, limit=3, sort=-published"); ?> <?php foreach ($port as $key2) { $imgOrigin = $key2->feature_img->url; $imgSplitted = $imgOrigin.'.webp'; $date1=date("H:i | d/m/Y", $key2->modified); echo and for thumb image i changed to the following. <div class='boxImage lazy' style='background-image: url({$imgSplitted});'> </div> <span class='news-time'>$date1</span> <p class='n-title'>{$key2->title}</p> <a href='{$key2->url}' title='{$key2->title}' class='cards-link-overlay'>&nbsp;</a> </div>"; instead of the main "Feature_img-" code, which is related in my case to the image upload box, then i used Libwebp to convert all images to webp. In my case, i got the following results : 1- Thumbnail, all images converted to webp and the preview is working fine on my website. 2- When i upload webp image to a new article, its uploaded perfectly with no issue. i used different method as well, which is creating a new field for file upload, then i changed the main image source to this field name, where the result was accept webp file and previewed successfully
×
×
  • Create New...