I uploaded an image in asset library and imported that using below code in my LWC js file

import PLACEHOLDER_IMAGE from '@salesforce/contentAssetUrl/placeholderImage'; 
export default class CpFeatures extends LightningElement {
    // Expose the asset file URL for use in the template
    placeholderImage = PLACEHOLDER_IMAGE;

When I am pushing the code to the org I am getting

Exception while getting the content asset for reference placeholderImage of type contentAssetUrl in file

  • This might be a simple question, but was the content asset uploaded to the same place you are deploying?
    – Kevin Hill
    May 8, 2019 at 15:37
  • Yes, it was added to the same community's content assets.
    – Saloni
    Feb 19, 2020 at 18:35

1 Answer 1


I ran into the same issue. To fix it I added the contentassets to my vscode project, and then the deployment went through.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .