Reducing unused code. Tried to use ImageResource but not successfully.