internally edit an image

i am using webgl with glsl v300es so i assume its relevant to post here
can/how would i go about editing an image with in a fragment shader but keeping it with in the gpu (with out sending it to the cpu and uploading again)

The usual way to do this is to use a Framebuffer Object (FBOs) for rendering. This allows you to read from GPU textures and write to GPU textures.