Add nested img directory support