When working on the final touches of a Drupal 8 project we ran into a very strange issue. Every single time I opened the file browser, apache got stuck and the system load went sky high. First I blamed the media browser, but a quickly generated view that rendered a list of all the image/* items in de file library showed the same problem.
Tailing the logs brought nothing, no strange segfaults or other memory errors. In a last resort I switched Mamp to PHP 7.1 and to my surprise the images where rendered. Deleted the files/styles content, re-ran the view. And presto images were back.
But our production environment runs PHP 7.0.15, so the sites needs to work with that PHP version as well. Started to compare the php.ini files and the only difference was that for PHP 7.0.x I turned on MAMP directly in the php.ini instead of using the MAMP interface. I wanted to run both Opcache and APCU like we do in production. Turned off the apcu.so in php.ini, cleared the files/styles content and to my amazement the image derivates where re-generated, no more sysload and deadlocked apache process. So if you have bugging or hanging Drupal 8 image generation in MAMP, turn off APC and see if it solves your issue ;)