How to display Images using static resource in LWC

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 1

  • @nehajamdade2983
    @nehajamdade2983 Рік тому

    Hi,
    I have created a car object which is having a picture field of type url which is storing the static resource url in it.
    So my url is /resource/cars/sports/audi.png
    And in lwc I'm putting it in img tag as
    src={car.Picture__c}
    Car is my obj and picture is field.
    But it's not showing any image can you tell me where I'm going wrong
    I also tried putting some default image in the tag directly but still the image is not visible