This content originally appeared on DEV Community and was authored by Vadim Filimonov
Netology has an excellent article on how to properly name files.
In short, all you need to do is:
- Use only Latin letters and numbers;
- Do not use capital letters;
- Do not use spaces. Separate words with a dash;
- Give meaningful names in English.
To perform the first three rules in Drupal 8 there is a module — Transliterate filenames for uploads.
Install:
composer require drupal/transliterate_filenames ; drush en transliterate_filenames -y
Check:
The module itself will replace uppercase letters with lowercase ones, spaces with underscores, and Cyrillic with Latin.
The only thing it won't do is that it won't translate the file name into English, so you'll have to keep an eye on this yourself.
This content originally appeared on DEV Community and was authored by Vadim Filimonov
Vadim Filimonov | Sciencx (2022-04-18T04:25:54+00:00) Naming files / Drupal 8. Retrieved from https://www.scien.cx/2022/04/18/naming-files-drupal-8/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.