How to override magento 2 order/items/renderer/default.phtml?

We can override default.phtml file using below way,
Create sales_order_item_renderers.xml in your module layout folder,
File path will be in your module,

Replace Rbj_Training with your actual module name.

Clear Cache and check your file will be overridden.

How to send image attachment with email template in magento 2

For Attach image in email template, you need to override TransportBuilder Class from Magento\Framework\Mail\Template\TransportBuilder

For Override TransportBuilder.php file in Magento 2, you need to create di.xml file.
Using di.xml file you can override any php class in Magento 2.

Create di.xml in your module,

Create TransportBuilder.php file at below location,


Create helper file to send image attachment in mail template,