Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Automatically rename uploaded images with blueprint field values

theme

Started by Benjamin 5 years ago · 0 replies · 555 views
5 years ago

Hello,

For a multi file upload field, I found that we can use random_name: true, which renames each file with 15 characters long random string .

But is there a way to automatically rename uploaded images with values from the blueprint fields and add a numeric sequence?

For example let's say I have an image file named "badly named image with spaces (23).jpg", is it possible to apply the following file naming rule?

[PageTitle]-[PageCustomField]-[NumericSequence].jpg

👍 1

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1138 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 62 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 136 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 110 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 130 7 months ago