Do you mean like this?
<img src="https://i0.wp.com/vezlay.com/wp-content/uploads/2018/08/file-page1-1-1.jpg?fit=400%2C552" data-src="" class="attachment-full lazyDone" alt="Vegetarian Shawarma" srcset="https://i0.wp.com/vezlay.com/wp-content/uploads/2018/08/file-page1-1-1.jpg?w=400 400w, https://i0.wp.com/vezlay.com/wp-content/uploads/2018/08/file-page1-1-1.jpg?resize=217%2C300 217w" sizes="(max-width: 400px) 100vw, 400px" width="400" height="552">
If so, that’s standard, and how you shoudl be doing it. What it’s doing is setting up multiple image sizes so that browsers can choose which one is the most suitable to display for their particlar settings and resolution.
If that’s not it, then give us an example of what you mean so we can see.