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.

General

[SOLVED] Renaming files on upload/referencing image uploaded in Twig

Started by P. Fighter 8 years ago · 0 replies · 631 views
8 years ago

Is there a way to rename files uploaded via the admin panel? - Preferably to something like the page title or perhaps something hardcoded.

However, what I really want to do is to upload an image via the admin panel and then have it show up in the page without renaming any files. Any way to do this without knowing the file name?

EDIT

Figured it out: https://learn.getgrav.org/cookbook/twig-recipes#displaying-an-image-uploaded-in-a-file-field

last edited 03/20/18 by P. Fighter

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 95 15 hours ago
General · by pamtbaau, 20 hours ago
1 61 19 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 356 5 days ago
General · by Duc , 6 days ago
3 44 6 days ago