502 error on sync after adding images

502 on sync after adding images

After adding an image to components in plasmic then trying to sync, I’m getting the following error. Bad gateway usually signals something wrong with a server however if I remove the images and try to sync it works so it seems related to images. Any idea what’s going on?

Plasmic error: Error: request failed with status code 502. The response is
  <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.25.3</center>
</body>
</html>
Error: Error: request failed with status code 502. The response is
  <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.25.3</center>
</body>
</html>

    at [PlasmicApi.post](http://PlasmicApi.post) (/Users/sbelbeck/.config/yarn/global/node_modules/@plasmicapp/cli/dist/index.js:502216:13)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async PlasmicApi.resolveSync (/Users/sbelbeck/.config/yarn/global/node_modules/@plasmicapp/cli/dist/index.js:502058:18)
    at async sync (/Users/sbelbeck/.config/yarn/global/node_modules/@plasmicapp/cli/dist/index.js:504633:29)

In your plasmic.json, what’s the configuration for images?

“images”: {
“scheme”: “inlined”,
“publicDir”: “…/public”,
“publicUrlPrefix”: “/static/”
},

I think the issue is that he image is too large to be inlined

What’s the size of the image?

it’s 45kb

Can you try syncing again with the image please?

ya we’re either getting blurry images at lower sizes or 502 error

Can you try changing the image strategy to one other than inlined? cdn would probably be the best one.

unfortunately we can’t host our images on external CDNs, but updating to use the files strategy fixes that issues

thanks for your help