Fixing _pic function to handle urls with parameters