Adjusted the image function and created it as a view for other pages.