SharePoint 2013 custom solutions: Image referenced from 15 hive shows error

SharePoint 2013 contains both 14 hive and 15 hive folders to support both 2010 and 2013 solutions.

Issue: If you are updating your 2010 solution to 2013. You make all the changes, moved all your images and reference files to 15 and left the references in solution as http://sharepoint/_layouts/CustomSoltuion/Images/one.png – you get an error instead of image there.

Yes, you have moved the image to a folder under 15 hive. But still, it does not show up.

Resolution:By default in 2013 _layouts/ is not going to point to the current version. If you are developing a solution for SharePoint 2013 or updating a solution which is already developed for 2010, you have to be careful about this path.

In 2013, 15/layouts should be referred are _layouts/15. whereas in 2010 14/layouts folder can be referred as _layouts/.

So, in the above example, reference should be updated to http://sharepoint/_layouts/15/CustomSolution/Images/one.png.