craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 635 forks source link

[4.3.3]: Image transforms: automatically generated directories #12374

Closed idleog closed 1 year ago

idleog commented 1 year ago

What happened?

Can anyone explain this: a lot of directories appearing in the assets directory (see screenshot)

Bildschirm­foto 2022-11-24 um 09 43 08

Cheers Peter

Craft CMS version

4.3.3

PHP version

8.1.10

Operating system and version

MAMP6.6.4 on MacOS13

Database type and version

Mysql

Image driver and version

No response

Installed plugins and versions

"craftcms/cms": "4.3.3", "craftcms/feed-me": "5.0.4", "craftcms/redactor": "3.0.2", "doublesecretagency/craft-cpbodyclasses": "2.3.0", "doublesecretagency/craft-cpcss": "2.5.0", "idleog/craft-goeldi": "^4.0", "nystudio107/craft-cookies": "4.0.0", "sebastianlenz/linkfield": "2.1.4", "verbb/cloner": "2.0.3", "vlucas/phpdotenv": "^5.4.0"

i-just commented 1 year ago

Hi, thanks for reaching out. Craft CMS creates transforms based on: the transforms you specify in settings > assets > image transforms, the transforms you specify in your codebase (if you choose to do that) and also, based on what it needs for the control panel. The control panel transforms will be used on the assets index page or in the entry editor if you're adding images to your entry.

For example, I have 2 images specified in my volume (square one and rectangular one). If I then visit assets listing page and have my assets show in a table, I see 4 new transform folders created. If I switch that page to show thumbnails, another 4 transform folders are created.

Screenshot 2022-11-24 at 14 14 24

Hope this helps clear things up!

idleog commented 1 year ago

Hi, thanks for the quick answer! I wonder if this is the right place for these transform-directories? cheers Peter

i-just commented 1 year ago

It's the default place. You can specify where the transforms should be created in your volume settings though (settings > assets > volumes > {your volume}. You can change a transform filesystem and/or subpath, so that it's more suited to your needs/liking.

idleog commented 1 year ago

Ok, that's new in Craft4 then. I think it would be nice if places of CP-Transforms and Frontend-Transforms could be seperated. But not really a big issue.

Thanks a lot Peter