How can I create rules that allow to display jpg and png files in a url protected by cloudflare?

I would like you could help me to understand how I could create rules in the cloudflare environment that allow to show only and exclusively jpg and png files.
Could you help me with this?
Thanks in advance, community!