use hasattr to check property cache
add --post_id argument
fix filename on redirected image link