post using r to compress pictrues