Use Plugin Conditionally

Hello guys.

I have one rather simple question.

Is there a way to use created plugin conditionally?

For example, I would like to use AMP plugin that converts img tags to amp-img only on template called amp-template.

Any help is welcome.

Thank you in advance.

Is that your own plugin?

Yes, it is.

Then you can set options/conditions in your plugin?

Thank you very much.

The solution was more obvious than I ever thought.