Relative url for image

Is it possible to get a relative url for an image? I am using dompdf and the images only work in the pdf if they are relative. This is what I have for the absolute url:

<?=$page->images()->sortBy('sort', 'asc')->first()->resize(380,null,80)->url()?>

Hm, I can’t find a method that does this. You could create a custom file method, though.

You probably just shortened your code, but don’t use it as above, check for a file object before calling resize.