Presently, this API only supports a single image per menu item. You can attach the image to a menu item in the following fashion (see below). Alternatively, you can provide the image on creation.

curl --globoff \
  --request PATCH \
  --url 'https://api-g.weedmaps.com/wm/2024-01/parters/menu_items/MENU_ITEM_ID' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer [ACCESS TOKEN HERE]' \
  --header 'content-type: application/json' \
  --data '{ "image_url": "https://picsum.photos/300/300" }'

📘

Update an Image without Changing Its URL

There are instances where you may update an image, but the image url remains the same. Weedmaps would not recognize that change, which means the image would remain the same on our side. In order to force the update, you can provide an image_updated_at value within the attributes object. This integer timestamp will ensure a new image is downloaded.

Do NOT use this feature if your image urls do change when the image changes, as it may cause unintended side-effects.

Troubleshooting

Weedmaps runs a couple of validations to ensure images can be downloaded in the most performant and secure fashion. Prior to reaching out, please make sure all of the items below are true.

HEAD Requests

When you provide us an image URL, we send a HEAD request to it as a way to ensure the image can be downloaded. The response must return a 200 in order for us to proceed. If you're having difficulty getting your images to return a 200 response, please reach out to your image service provider to see what options you can have. At this time, Weedmaps cannot resolve this issue on your behalf and there is nothing we can do.

Image Formats

When we attempt to download an image, we compare the image format (JPG or PNG) provided in your response headers against the file that's provided. If those values don't match, we don't download the image.

For example, your image file may return an image with a "Content-Type" of image/jpg, but when we check the file, it's an image/png. You can check the true content type for an image by running something like the following on a downloaded file:

file -b --mime-type ~/path/to/image.png