k_nadam's avatar

Preload Images

How to preload dynamic images in Laravel, Inertia, Vue 3? adding a link with rel="preload" in inertia header doesn't seem to be working.

1 like
1 reply
JussiMannisto's avatar

You'll have to put those in the <head> of the base blade file. Inertia's Head component is only handled when the page is being rendered, so it's too late to preload anything.

If you can send the links as response headers, that's even better. It allows the browser to start loading them even before receiving any html.

3 likes

Please or to participate in this conversation.