Skip to content

Commit 1ea6a0c

Browse files
committed
[ADD] guidelines: media files section in content guidelines
1 parent a6b3f03 commit 1ea6a0c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

contributing/documentation/content_guidelines.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,42 @@ A few tips to improve your screenshots:
160160
Resizing the window's width is the most important step to do as Odoo's responsive design
161161
automatically resizes all fields to match the window's width.
162162

163+
.. _contributing/media-files:
164+
165+
Media files
166+
-----------
167+
168+
A **media filename** is written in **lower-case letters** and is composed of two parts:
169+
170+
#. An **identifying name** relevant to the media's content. E.g., ``awesome-filename``.
171+
172+
.. important::
173+
Use a **hyphen** ``-`` to separate the words in the media filename.
174+
175+
#. The **file extension**, which is ``.png`` for most images.
176+
177+
Each document has its own folder in which the media files are located. The folder's name must be the
178+
same as the document's filename.
179+
180+
For example, the document :file:`doc_filename.rst` refers to two images that are placed in the
181+
folder ``doc_filename``.
182+
183+
::
184+
185+
├── section
186+
│ └── doc_filename
187+
│ │ └── something.png
188+
│ │ └── awesome-filename.png
189+
│ └── doc_filename.rst
190+
191+
192+
.. note::
193+
Previously, image filenames would mostly be named with numbers (e.g., :file:`feature01.png`) and
194+
placed in a single ``media`` folder. While it is advised not to name your *new* images in that
195+
fashion, it is also essential **not to rename unchanged files**, as doing this would double the
196+
weight of renamed image files on the repository. They will eventually all be replaced with new
197+
content.
198+
163199
.. _contributing/alt-tags:
164200

165201
ALT tags

0 commit comments

Comments
 (0)