I've looked at the following post and a few others, and the methods for constructing the image URL are failing for me: Getting full image url for products via REST API

How can I construct the full image URL paths for the images returned for a category and a product?

For a category the image information is provided in the custom_attributes array like the following:

   "attribute_code": "image",
   "value": "look01_index.jpg"

For a product's description the image URL I'm after looks like the following:

  "id": 3717,
  "media_type": "image",
  "label": null,
  "position": 1,
  "disabled": false,
  "types": [
  "file": "/l/o/look01_index_1.jpg"

I've tried to make the path with {IPADDRESS}/pub/media/catalog/product/{IMAGE FILE} and this fails for both the product and category.

Any Help?

1 Answer 1


For Categories: {IP_ADDRESS}/pub/media/catalog/category/{FILE NAME}

For Products: {IP_ADDRESS}/pub/media/catalog/product/{PATH IN DETAILS}

Learned the category path by by hovering over the image on the admin GUI. For products, I believe I was trying to use the category file name in the product path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.