Hoe kan ik de nginx-config rechtstreeks in discourse/docker bijwerken?

Can you explain why you want to do that?

“Photos” can in any case be uploaded to Discourse. Image upload and optimisation is built into Discourse already.