Issue after moving cockpit cms to another folder

Hi cockpit dev,

I Use cockpit with SQLite database.

I would like to move the CMS to another folder, problem is thumbnails links generated continue to be target on the old url of storage/thumbs/. I understand old thumbnails links are store in database. So my question is, there is a way to “source” datas after moving or deploy Cockpit ?

More generally, what is best practices to manage data when we deploy cockpit ? Is it to get one storage/ folder per env ?

Thanks!

1 Like

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?

Any suggestions? :confused: