title: Append text string to end of image file on page load / download
body: <p>I want to append something like this in real time (god help me) to a low traffic site:</p>
  <p>When the page loads, some assets (images) are loaded (lazily)) let's assume the page would normally serve image1.png, image2.png, and image3.png</p>
  <p>I would like to concat &quot;username:%user%&quot; where user is the logged in wp_user to the end of image1/2/3.png (not as a watermark, but by literally adding the string to the file itself) by real-time copying them to a temp directory and serving them from there.</p>
  <p>While this is an unorthodox request, is there any realistic way to do this using nginx or wordpress?</p>
  <p>Including site.conf</p>
  <pre><code>server {
  server_name test.com www.test.com;
  root /var/www/test.com/public_html/;
  index index.php index.html index.htm index.nginx-debian.html;
  client_max_body_size 100M;
  location / {
       proxy_max_temp_file_size 0;
       try_files $uri $uri/ /index.php?q=$uri&amp;$args; 
  }
  
      location ~ \.php$ {
              include snippets/fastcgi-php.conf;
              fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
      }
  
      location ~ /\.ht {
              deny all;
      }
      location = /favicon.ico { log_not_found off; access_log off; }
      location = /robots.txt { log_not_found off; access_log off; allow all; }
      location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
          expires max;
          log_not_found off;
      }
      location = /xmlrpc.php {
        deny all;
        log_not_found off;
        return 200;
      }
  
  listen 443 ssl; # managed by Certbot
  include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  }
  </code></pre>