[config] Clean Up. Use idioms.

Rubocop inspired this change.
[image.slim] Make width and height optional
[index_html builder] Consolidate replace code