Home  >  Q&A  >  body text

javascript - vue2 image loading failure and placeholder image flickering problem

When developing vue2.
export const waterFallPlaceholder = e => {
    e.src = "../../images/WaterFallBanner.png";
    e.onerror = null;
    return e.src;
}

Then I struggled to find the problem. I inadvertently converted the relative path image into a base64 image, and the problem was solved. Since I don’t know much about base64, could you please tell me what the root of this problem is.

欧阳克欧阳克2708 days ago776

reply all(1)I'll reply

  • 三叔

    三叔2017-06-12 09:33:18

    With this setting, webpack cannot package images. Written in template.

    reply
    0
  • Cancelreply