Convenient practice for where to place images?
Posted
by
Baumr
on Pro Webmasters
See other posts from Pro Webmasters
or by Baumr
Published on 2012-12-17T00:02:54Z
Indexed on
2012/12/17
5:13 UTC
Read the original article
Hit count: 311
A lot of developers place all image files inside a central directory, for example:
/i/img/
/images/
/img/
Isn't it better (e.g. content architecture, on-page SEO, code maintainability, filename maintainability, etc.) to place them inside the relevant directories in which they are used?
For example:
example.com/logo.jpg
example.com/about/photo-of-me.jpg
example.com/contact/map.png
example.com/products/category1-square.png
example.com/products/category2-square.png
example.com/products/category1/product1-thumb.jpg
example.com/products/category1/product2-thumb.jpg
example.com/products/category1/product1/product1-large.jpg
example.com/products/category1/product1/product2-large.jpg
example.com/products/category1/product1/product3-large.jpg
What is the best practice here regarding all possible considerations (for static non-CMS websites)?
N.B. The names product1-large
and product1-thumb
are just examples in this context to illustrate what kind of images they are. It is advised to use descriptive filenames for SEO benefit.
© Pro Webmasters or respective owner