E
E
eugene1592020-10-14 18:55:45
MODX
eugene159, 2020-10-14 18:55:45

Why does phpthumbon create a cache subfolder. How to fix?

Hello.

There is this snippet:

<?php
if (!$src) return '';

$src = $modx->runSnippet('phpthumbon', [
    'input'   => $src,
    'options' => '&w=200&h=200'
]);

$src = $modx->runSnippet('phpthumbon', [
    'input'   => $src,
    'options' => '&w=100&h=100'
]);

return $src;

I call it:

Result:
/assets/cache_image/assets/cache_image/products/rar/kr01/01_200x200_9c7_100x100_791.jpg

Question. Why two folders /assets/cache_image/ as a result? Why is this? How to get rid of it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Komatera, 2020-10-15
@Komatera

I could be wrong, but you already have /assets/image by default, it corresponds to /assets/cache_image/.
You write /assets/images/products/rar/kr01/01.jpg which creates the path /assets/images/assets/images/ which corresponds to /assets/cache_image/assets/cache_image/
Try:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question