Is it possible to configure image optimization in a project

Hello, is it possible to configure image optimization in a project?

Hello @warm_swallow! If you are using codegen. You can add "images": {"scheme": "cdn"} to your plasmic.json to enable image optimization in your project.

Now, if you are using the headless API (PlasmicLoader), all new projects have image optimization by default. If you have an old project, you should get a prompt in your project to enable the image optimization if you haven’t already.

Thanks @samuel so it looks like all we can for now is turn on image optimization but we don’t have any settings to configure/ or fine-tune exactly how it works. Is that correct?

Yes, you’re right.

@warm_swallow What kind of control are you looking for?

I was hoping to be able to explicitly set the quality level of an image for example.

Ah that is not possible at the moment. Are you looking to do this for each image that you use, or for all images in the project?

““images”: {“scheme”: “cdn”}”

how do i setting so that my assets eg. media, css and js can be hosted on s3 + cloudfront?

That only applies if you have a plasmic.json (if you’re using codegen)

If you want assets to be served from S3, you’ll need codegen and manage it yourself. You also don’t get image optimization that way since that requires a server handling dynamic requests.

both would be great … lets say a global setting that could be overridden on an a per-image basis