Issue after moving cockpit cms to another folder

Another thing about this subject.
I generate different thumbnails sizes per Gallery image with this script.

$sizes = [640, 768, 1024, 1440, 1960];
foreach ($sizes as $size)
{
    $url = cockpit('cockpit')->thumbnail([
        'src' => $galleryImage["path"],
        'mode' => 'fitToWidth',
        'width' => $size
    ]);
    
    // ...
}

This one return a complete url of the thumbnail. (ex: http://localhost/cokpitfolder/storage/thumbs/…)

About migration of cockpit folder I was thinking it could be better to get a relative path to the thumbnail (ex: /storage/thumbs/…).

Like says @pauloamgomes:

Is there a way to get this thumbnail path?

1 Like