handle AJAX GET requests to fetch images by tag