My setup: IIS 8 on Windows Server 2012 – WordPress images 500 error, not displaying correctly / broken images.

If you’re having the dreaded “broken images” problem while running WordPress under IIS. (any version)

It’s a permissions thing. The images aren’t getting displayed even though you can clearly see them in WordPress’ ‘upload’ directory because before WordPress copies an image to it’s upload directory, it first gets copied to the folder C:\Windows\Temp.

If the C:\Windows\Temp directory doesn’t have “modify” permissions for both IUSR and {servername}\IIS_IUSRS user accounts.  The images will not have these permissions when it gets copied to WordPress’ upload directory either – and therefore the image will not be displayed.

The Fix?

Add both IUSR and {servername}\IIS_IUSRS with “modify” permissions to your C:\Windows\Temp directory and re-boot your server for these changes to take effect.

NB:  One reader commented to me that he is concerned about changing security permissions on the Windows TEMP directory, and he noted that you can also edit the php.ini file and change the location of the “upload_tmp_dir” variable and point it to another location.  It’s up to you how you want to do this, as long as you have the right permissions mentioned above, your WP images and future uploads will work fine.

A million thank you’s to  The Amixa Web Guru