title: WordPress image editor broken when using S3 Offload Lite plugin
body: <p>I'm using the <a href="https://wordpress.org/plugins/amazon-s3-and-cloudfront/" rel="nofollow noreferrer">WP Offload S3 Lite</a> plugin on my Wordpress site. Uploading and creating the thumbnails seems to work fine, but when I try to edit the image using WP's built-in image editor, it displays a broken image:</p>
  
  <p><a href="https://i.stack.imgur.com/PLzSY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PLzSY.png" alt="enter image description here"></a></p>
  
  <p>How can I fix this error? </p>
  
  <p>My nginx error log shows:</p>
  
  <p><code>
  2016/11/05 16:10:44 [error] 6767#0: *164466 FastCGI sent in stderr: "PHP message: WPOS3: There was an error attempting to download the file store/2016/11/forests-why-matter_63516847.jpg from S3: The local directory /home/avishai/apps/myapp/releases/20161105032906/public/wp-content/uploads/2016/11 does not exist and could not be created.
  PHP message: WPOS3: File /home/avishai/apps/myapp/releases/20161105032906/public/wp-content/uploads/2016/11/forests-why-matter_63516847.jpg does not exist" while reading response header from upstream, client: 108.162.219.242, server: example.com, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "example.com", referrer: "http://example.com/wp-admin/tools.php?page=regenerate-thumbnails&amp;goback=1&amp;ids=14309&amp;_wpnonce=fd0b4e4dab"
  </code></p>
  
  <p>My server has those directories <code>chown</code>ed by the nginx user, and is writeable. </p>