New answers tagged

0

But as far as i researched, their currently is no built in feature to archive this. I setup my server with a cronjob that runs the following script periodically: find <image-dir> -type d -regextype sed -regex ".*/_[0-9]\{3,4\}x[0-9]\{3,4\}.*" -exec rm -rv {} \; This will delete all folders that look like this example: _650x430_center_center.


1

We may need a bit more info to properly debug this, but I wanted to offer some advice and context surrounding the structure of the loop and fetching data so we can at least make sure we're examining the right content! My suspicion is that this is just a limitation of Craft or PHP's serialization capability, and it's discarding field values that are prepared ...


0

Like all relational fields, Assets fields return an ElementQuery instance (element queries are basically pre-baked query builders for fetching elements). You can use that ElementQuery's title() parameter to narrow down results based on assets' titles, including fuzzy searching. Here's how you could query for only assets with a title that contains the search ...


Top 50 recent answers are included