Options -Indexes
<FilesMatch "\.php$">
    Deny from all
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|png|webp)$">
    Allow from all
</FilesMatch>