1. A computer implemented method comprising: receiving a client identifier from a client device associated with a user of a social-networking system; establishing, based on the client identifier, a wireless communication link with the client device, wherein the wireless communication link is established after a particular duration of time has passed; determining based on the particular duration of time being above a threshold duration, an operational context indicating that quality of a data connection with the client device is too low to transmit an image in its original form; determining one or more image parameters based on the operational context of the client device, wherein the image parameters: specify creation of an optimized image that is based on the image in its original form; and comprises one or more modifications for the optimized image, wherein the modifications reduce the data size of the optimized image; creating the optimized image based on the image parameters for provision to the user; and providing the optimized image to the client device and to an image repository.
1. A computer implemented method comprising: receiving a client identifier from a client device associated with a user of a social-networking system; establishing, based on the client identifier, a wireless communication link with the client device, wherein the wireless communication link is established after a particular duration of time has passed; determining based on the particular duration of time being above a threshold duration, an operational context indicating that quality of a data connection with the client device is too low to transmit an image in its original form; determining one or more image parameters based on the operational context of the client device, wherein the image parameters: specify creation of an optimized image that is based on the image in its original form; and comprises one or more modifications for the optimized image, wherein the modifications reduce the data size of the optimized image; creating the optimized image based on the image parameters for provision to the user; and providing the optimized image to the client device and to an image repository. 12. The computer implemented method of claim 1 , further comprising: generating at least one URL including an operational context identifier and an image type identifier associated with the operational context; and embedding the at least one URL within a webpage.