Set config in directive constructor
Parse image ratio