Skip to content

Issue with alpine template <img :src> tag not converted in <picture> tag - Hyva themes #162

@rahul-navigate

Description

@rahul-navigate

I am having yireo/magento2-webp2:0.13:4 installed along with hyva theme 1.3.7

I have used alpine component using to render dynamic category images on home page but the tag is not converted in tag.

Below is the syntex which i am having.

<template x-for="category in categories"> <a :href="category.url"> <div class="w-suto sm:w-auto relative h-auto sm:h-auto md:h-auto xl:h-48 hover:text-orange-h1 hover:drop-shadow-md"> <img :src="category.thumbnail_image" class="relative w-auto mx-auto block border-gray-h3 border border-solid bg-white relative" :alt="category.name" loading="lazy" height="151" width="160" /> <div class="relative bottom-0 w-full top-2 sx:top-1 uppercase"> <span :href="category.url" class="block text-sm font-bold text-center" x-text="category.name" > </span> </div> </div> </a> </template>

Expected result:
tag should converted in tag with webp format as it works well in other pages too.

Actual result:
tag not converting in tag.

Magento version: 2.4.6-p1
PHP version: 8.1
Module version: 0.13.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions