how do i create a specific handler for a url?
I want to create an image generator that will use a url like : /image-generator?a=1b=2c=3
The image generator will be dynamic and create an image based on the params. It will also output the image. So there will be no HTML and the header will return content-type: image/jpg
.
What's the best way to achieve this? I looked into creating a custom route, but apparently you're not supposed to do that. Do I need to create a custom type and a post and set a custom handler for that type? How can I make it go straight to code and skip all the templates?
Topic routing custom-post-types Wordpress
Category Web