added sorting and direction to image ransack search