Implemented the resource preview.