Having trouble converting an image.Image to []byte. The problem spot is wrapped in dotted lines.
image_data, err := mybucket.Get(key) if err != nil { panic
You want a bytes.Buffer, not a bufio.Writer. bytes.Buffer is used when you need a writer that writes to memory. bufio.Writer just caches data in memory before forwarding it to another writer.
buf := new(bytes.Buffer) err := jpeg.Encode(buf, new_image, nil) send_s3 := buf.Bytes()