Serving images comfortably in WriteFreely using NGINX and Nextcloud

#smarthome

WriteFreely, which I self-host for this blog, cannot natively serve images. It is designed so that you combine it with a photo serving platform like e.g. snap.as.

I found the solution for this problem by using NGINX and Nextcloud:

  # Serve images                                                                        
        location /images/ {                                                                   
                 alias /home/nc_data/Kemal/files/Public/;                                     
                 autoindex off;                                                               
                 access_log off;                                                              
                 expires 30d;                                                                 
                 add_header Cache-Control "public";                                           
                 } 
![Name](https://write.moxnet.eu/images/Name.jpg)

Hope this helps someone else also.

Keep on hacking!