I found a function that allows me to attach a category to an image in media uploader
function add_categories_to_attachments() {
register_taxonomy_for_object_type( 'category', 'attachment' );
}
add_action( 'init' , 'add_categories_to_attachments' );
I'd like to be able to, when I'm in the category I assigned the image to, get the url of the image.
I just need to find out how to extract the info about the image associated with that category.
I should be able to do that via taxonomies, but I don't know how to achieve that.
EDIT: I forgot to add that I'm working outside of the loop, I need to show this image in the breadcrumbs of the category view.