My brand-new WordPress install was letting me upload images just fine, but would only show them to me in editor mode. Otherwise it displayed an “?” icon.
After much digging and checking of file ownership/permissions, I found the answer:
My apache2 2.4.5 requires “require all granted” directive, in addition to “allow from all”.
/etc/apache2/sites-enabled/wp.conf now looks like:
Alias /wp/wp-content /var/lib/wordpress/wp-content
Alias /wp /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
<Directory /var/lib/wordpress/wp-content>
Options FollowSymLinks
Order allow,deny
Allow from all
Require all granted
</Directory>