Categories
Wordpress

Render or Display images without a file extension type in the image url

Challenge - We migrated a wordpress site from one host to another. The new host does not render or display images when there is no file extension specified in the image URL, however the old host was able to render or display the same images without a file extension.

Solution – Simply enable the multiviews option for mod_negotiation to the .htaccess file in your wordpress installation.   Add the below lines to your .htaccess file

# Begin - Render or diaplay images without the file extension


<IfModule mod_negotiation.c>
Options +MultiViews
</IfModule>



# End - Render or diaplay images without the file extension
If you do not want your apache server to display images without file extension then you can disable the multiviews option by adding the below code
    

<IfModule mod_negotiation.c>
Options +MultiViews
</IfModule>


Leave a Reply

Your email address will not be published. Required fields are marked *