J
J
Julia2022-04-19 09:37:46
Layout
Julia, 2022-04-19 09:37:46

How to name pictures in a real project? 01-02 or full name?

In the streams that I watched, they called 01/02 or by the name of the block. But in one of them it was also said that it was only for the stream and in general it should be called adequately. How is that adequate? By what is shown in the picture itself? Or, for example, an aluminum block and pictures of aluminum-01, etc.?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey delphinpro, 2022-04-19
@harooo

In layout it is more convenient to call ordinal names grouped in folders.
At the same time, it is better to place such images in a separate directory so that later the programmer clearly understands which images he doesn’t need, because they will be added through the admin panel, and they can be safely deleted.
for example

/images
  /content
    /gallery
      /1.jpg
      /2.jpg
      /3.jpg
    /slider
      /1.jpg
      /2.jpg
      /3.jpg

Why is it convenient?
Well, first of all, you will not waste time inventing names for files. Time is money.
Secondly, if you use a template engine, then you can easily multiply pieces of blocks
<div class="slider">
  {% for i in 1..3 %}
    <div class="slide">
      <img src="/images/content/slider/{{ i }}.jpg">
    </div>
  {% endfor %}
</div>

And what content managers will name the files in the combat project is no longer your concern.

F
ForSureN1, 2022-04-19
@ForSureN1

If it's static, then whatever you want, if it's dynamic, then it doesn't matter, because on the server side, the names themselves are converted

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question