How can I host images for my website on my Raspberry Pi?
As per comments, this is what a web server is for. What's available is mostly dictated by the operating system; presuming you are using Raspbian/RpiOS, that is essentially "linux" and anything from this list with turquoise in the "Software license" column should work. The most popular are Apache and nginx.
node.js, but again, this is all really a matter of personal preference.
for all over the world, not just local network access
This is potentially tricky depending on where the Pi is. Presuming "your home", a complication is that you do not have a stable IP address there. One solution to this is using a (paid) dynamic DNS service. This is not very expensive. It is not an issue that is particular to the brand of hardware (100% irrelevant) and so you will be better server researching that in a broader context.
Can I open it up to just allow access to certain images
Sure. For obvious reasons web servers must restrict what local resources you can access with them. For example, commonly static stuff is placed in a directory hierarchy that parallels URLs. Eg., if you have a
/var/www/images/foo.jpg that's accessed via
www.mydomain.net/images/foo.jpg, the server could be set up to allow only content below
/var/www/. This is the methodology with Apache, but it is server specific -- others might use a different mechanism. Note the URL there is for a
.jpg image not an
.html page. These can be embedded in pages served remotely (ie., by another web server); while web browsers may implement some cross-site restrictions for security reasons this would not be considered a risk.
But none of this is pi specific; there is no web server written for the Raspberry Pi, so the best thing to do is research it within that broader context. There may be ten or so million Pis in the world running right now, and that number has been building for almost a decade, but Apache, eg., is probably serving ten times that number of web sites right now and has been a prominent fixture of the internet since the mid ninties.
That's not an endorsement or recommendation of Apache, just trying to illustrate that there's a distinction between your project and the brand of hardware you intent to use with it. Further there's no significant information overlap information between them.