<p>As you can see <a href="https://craftcms.com/docs/folder-structure#craft-storage" rel="nofollow noreferrer">here</a> </p>

<blockquote>
  <p><strong>runtime</strong>/ – Pretty much everything in here is there for caching and logging purposes. Nothing that Craft couldn’t live without, if the folder happened to get deleted.</p>
  
  <p><strong>assets</strong>/ – Stores image thumbnails, resized file icons, and copies of images stored on remote asset sources, to save Craft an HTTP request when it needs the images to generate new thumbnails or transforms.</p>
</blockquote>

<p>I can't think of a clean way to do this without changing too much and having much effort. The function, that returns the path is</p>

<pre><code>/**
 * Returns the path to the craft/storage/runtime/assets/thumbs/ folder.
 *
 * @return string The path to the craft/storage/runtime/assets/thumbs/ folder.
 */
public function getAssetsThumbsPath()
{
    $path = $this-&gt;getAssetsPath().'thumbs/';
    IOHelper::ensureFolderExists($path);
    return $path;
}

/**
 * Returns the path to the craft/storage/runtime/assets/ folder.
 *
 * @return string The path to the craft/storage/runtime/assets/ folder.
 */
public function getAssetsPath()
{
    $path = $this-&gt;getRuntimePath().'assets/';
    IOHelper::ensureFolderExists($path);
    return $path;
}

/**
 * Returns the path to the craft/storage/runtime/ folder.
 *
 * @return string The path to the craft/storage/runtime/ folder.
 */
public function getRuntimePath()
{
    $path = $this-&gt;getStoragePath().'runtime/';
    IOHelper::ensureFolderExists($path);

    if (!IOHelper::fileExists($path.'.gitignore'))
    {
        IOHelper::writeToFile($path.'.gitignore', "*\n!.gitignore\n\n", true);
    }

    return $path;
}

 /**
 * Returns the path to the craft/storage/ folder.
 *
 * @return string The path to the craft/storage/ folder.
 */
public function getStoragePath()
{
    return CRAFT_STORAGE_PATH;
}
</code></pre>

<p>Thus you can change the <code>CRAFT_STORAGE_PATH</code> but everything in there is pretty much hard coded</p>

CC BY-SA 3.0
2018-03-07T07:27:17.313Z
2018-03-07T07:27:17.313Z
Robin Schambach
<p>Can I get anyone to confirm the thumbs for assets used in CP are stored under craft/storage/runtime/assets/thumbs/? Is there a way to define a custom folder for that?</p>

<p>It's Craft 2 btw.</p>

<assets>
Asset thumbs path
# Asset thumbs path

(Asked by: username_0 on 2018-03-07)

Can I get anyone to confirm the thumbs for assets used in CP are stored under craft/storage/runtime/assets/thumbs/? Is there a way to define a custom folder for that?

It's Craft 2 btw.

**Tags:** assets


---

## 1 answers

### Answer by username_1 on 2018-03-07. Score: 2

As you can see here 

runtime/ – Pretty much everything in here is there for caching and logging purposes. Nothing that Craft couldn’t live without, if the folder happened to get deleted.
assets/ – Stores image thumbnails, resized file icons, and copies of images stored on remote asset sources, to save Craft an HTTP request when it needs the images to generate new thumbnails or transforms.

I can't think of a clean way to do this without changing too much and having much effort. The function, that returns the path is
/**
 * Returns the path to the craft/storage/runtime/assets/thumbs/ folder.
 *
 * @return string The path to the craft/storage/runtime/assets/thumbs/ folder.
 */
public function getAssetsThumbsPath()
{
    $path = $this->getAssetsPath().'thumbs/';
    IOHelper::ensureFolderExists($path);
    return $path;
}

/**
 * Returns the path to the craft/storage/runtime/assets/ folder.
 *
 * @return string The path to the craft/storage/runtime/assets/ folder.
 */
public function getAssetsPath()
{
    $path = $this->getRuntimePath().'assets/';
    IOHelper::ensureFolderExists($path);
    return $path;
}

/**
 * Returns the path to the craft/storage/runtime/ folder.
 *
 * @return string The path to the craft/storage/runtime/ folder.
 */
public function getRuntimePath()
{
    $path = $this->getStoragePath().'runtime/';
    IOHelper::ensureFolderExists($path);

    if (!IOHelper::fileExists($path.'.gitignore'))
    {
        IOHelper::writeToFile($path.'.gitignore', "*\n!.gitignore\n\n", true);
    }

    return $path;
}

 /**
 * Returns the path to the craft/storage/ folder.
 *
 * @return string The path to the craft/storage/ folder.
 */
public function getStoragePath()
{
    return CRAFT_STORAGE_PATH;
}

Thus you can change the CRAFT_STORAGE_PATH but everything in there is pretty much hard coded


---

