If the config option userewrite is set to .htaccess and the default .htaccess.dist is used by uncommenting all Rewrite directives, all image links on the pages and in the media manager are broken.
The .htaccess.dist is missing the following line:
RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L]
(As mentioned on the documentation page https://www.dokuwiki.org/rewrite