Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Override api class

Started by Thomas Vantuycom 5 years ago · 1 replies · 702 views
5 years ago

I'd like to override the \Grav\Common\Page\Medium\ImageMedium api class to change the url function so that images are served from Cloudinary. How would one go about this in a plugin?

5 years ago

As a starter, I'd check onMediaLocate event hook. But I guess you'd just have to debug what you get there 🤔 Not much info about it

Suggested topics

Topic Participants Replies Views Activity
Plugins · by complanar, 6 days ago
6 263 2 days ago
Plugins · by BenLaKnet, 3 days ago
1 95 3 days ago
Plugins · by complanar, 4 weeks ago
2 415 3 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 706 2 months ago
Plugins · by Mathieu Lecouturier, 2 months ago
3 545 2 months ago