R
R
Rokis2017-04-29 12:20:50
Drupal
Rokis, 2017-04-29 12:20:50

Why are images not loaded in files/template_img styled on Drupal?

Hello.
There is a site on Drupal. I load 2 types of images from two fields when adding material:
1) For preview (thumbnail). It is divisible by 2. The original is stored in /sites/default/files/template_img/ . Another image is created from it, already for viewing in the material itself at /sites/default/files/styles/img668/public/template_img/img.png?itok=bhQPuCjI
2) Original image. Loaded into /sites/default/files/template_img/ .
The problem is that images stopped loading at sites/default/files/styles/img668/public/template_img/ . Moreover, if I remove styles/img668/public from the address, the image appears. The rest of the images are fine.
I would love to change this address BUT! All previously loaded images are located exactly in sites/default/files/styles/img668/public/template_img/
. How can I make sure that pictures are added to this folder again?
With the rights everything is fine. Moved the site from the hosting to the server. There was no such problem before.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rokis, 2017-04-29
@Rokis

I spent 2 days wondering why this is happening. As a result, I solved the problem by adding to the config:

location ~ ^/sites/.*/files/styles/ {
    try_files $uri /index.php?$query_string;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question