rework code for adding images. can now search a new blog without needing to refresh first.