Responsive Image module is a core module in Drupal 8 and this guide will show setting up this module with working example.
Enable the Responsive Image module at http://www.yoursite.com/admin/modules.
We can use existing Breakpoint group but in this guide we will create our own Breakpoint group. It can be created as module or as theme and we will create this as module. Inside
/modulesfolder of your Drupal 8 site, create a folder labelled as "site_optimization".