title: Magento 2 Not Building Product Thumbnails Cache
body: <p>There are other, similar questions out there but non of which have the correct answer for me.</p>
  
  <p>I have a fresh Magento 2 installation, built using composer. I have done nothing on it apart from install sample data using the <code>php bin/magento sampledata:deploy</code> command followed by <code>setup:upgrade</code>, <code>setup:di:compile</code> and <code>setup:static-content:deploy</code>.</p>
  
  <p>When I go to a category page, the images are all 404-ing. The folder <code>pub/media/catalog/product/cache</code> is not being generated. The permissions are as per the Magento 2 docs:</p>
  
  <pre><code>pub/media/catalog/product$ ll
  drwxrwsrwx  8 matt     www-data 4096 Apr 21 10:38 ./
  drwxrwsr-x  3 matt     www-data 4096 Apr 20 14:02 ../
  drwxrwsr-x 35 www-data www-data 4096 Apr 21 10:35 cache/
  drwxrwsrwx  3 matt     www-data 4096 Apr 20 14:02 g/
  drwxrwsrwx  4 matt     www-data 4096 Apr 20 14:02 l/
  drwxrwsrwx  9 matt     www-data 4096 Apr 20 14:02 m/
  drwxrwsrwx  4 matt     www-data 4096 Apr 20 14:02 u/
  drwxrwsrwx  9 matt     www-data 4096 Apr 20 14:02 w/
  </code></pre>
  
  <p>I have GD installed and am running PHP 5.6.</p>
  
  <p>The memory limit in my php.ini file is set to 2048M. I know this is far too high but I was ruling out the memory limit as a cause.</p>
  
  <p>I have reinstalled Magento 2 several times.</p>
  
  <p>I have created PHP script to create folders and files within the product cache directory and that works without issues.</p>
  
  <p>When I go to a product view page or run <code>php bin/magento catalog:images:resize</code>, the <code>pub/media/catalog/product/cache</code> folder <strong>is</strong> generated.</p>
  
  <p>I have no idea what to do from here! Let me know if you need anything else from me.</p>
  
  <p>Would really appreciate any kind of help on this!</p>
  
  <p>For reference, here is a list of enabled PHP modules:</p>
  
  <pre><code>[PHP Modules]
  calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, Phar, posix, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zlib
  
  [Zend Modules]
  Zend OPcache
  </code></pre>