0

On node edition when i upload new image, like in basic page, all is working with .jpg and .jpeg picture but not with .png.

When i upload a new image, the style is well created in 'sites/default/files/styles/thumbnail/public' but when i save the node, it deleting my style. And image is of course not created in 'styles/original' when i'm accessing the page.

I'm working on nginx docker on Aws server. I try ImageMagick and GD2.

Here is my docker Nginx config :

upstream php_backend {
    server php:9000;
}
map $uri $new {
  include /etc/nginx/routes.map;
}
server {
    listen 80;
    root /var/www/html;
    index index.php;
        client_max_body_size 50M;

if ($new) { return 301 $new; } location @rewrite { rewrite ^/(.*)$ /index.php?q=$1; } location / { try_files $uri $uri/ /index.php?q=$uri&$args; } location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass php_backend; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~* \.(?:manifest|appcache|html?|xml|json)$ { expires -1; } location ~* \.(?:rss|atom)$ { expires 1h; add_header Cache-Control "public"; } location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1M; access_log off; add_header Cache-Control "public"; try_files $uri $uri/ @rewrite; } location ~* \.(?:css|js|woff|woff2)$ { expires 1y; access_log off; add_header Cache-Control "public"; }

}

Thanks for your help !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.