1

I'm using image transforms and getUrl() method to display an image.

I'm using Blitz to export my site as a static website.

My problem is that .html pages get cached with images that have full urls like this: http://localhost:8888/assets/pages/_medium/image.jpg

There must be an obvious solution that i'm missing... I've tried getPath but it doesn't support image transforms. Removing http://localhost:8888 should do the job.. but how?

1 Answer 1

1

Have a look at the settings of your asset's volume:

Go to: Settings > Assets > [Your Volume Name here]

Check the field "Base URL". If it starts with the alias @web, remove it.

E.g. "@web/images" -> "/images".

Now check the URL of your image again.

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.