0

I'm designing a site that wants to use lots of images, but while some users will be on broadband, other user groups will be on dial up or similar.

Is there some trick/module that can serve lower quality images based on a cookie, for example?

I guess I'm thinking perhaps a parallel set of image styles that uses a lower quality (these could be provided by image style quality module) and something that detects when one style is requested and switches it for the lower quality version?

Long shot asking for a technical solution to a design-based problem, but thought I'd ask in case anyone else has come upon this problem.

0

I don't know that there's a way to determine benchmark throughput performance on the fly without wasting a lot of the users time running a test, on every login. You could do something like:

  • add a field to the user profile that the user can change which dictates the speed they use

  • use a custom style or set of styles for all images

  • create a custom module to override hook_image_styles_alter() to adjust (if necessary, based on the user field value) the style to suit

This hook allows modules to modify, add, or remove image styles. This may be useful to modify default styles provided by other modules or enforce that a specific effect is always enabled on a style. Note that modifications to these styles may negatively affect the user experience, such as if an effect is added to a style through this hook, the user may attempt to remove the effect but it will be immediately be re-added.

This way the user can determine which speed they are using, and the system should adjust the images on all subsequent logins to fit their choice

  • I'm not sure this would work, the hook could be used to duplicate styles with lower qualities, but image styles are site wide configuration, so this would change configuration for all users for each user accessing the site, AFAICS? – artfulrobot Jun 18 '15 at 19:23
  • Hmm.. I think youre correct, it would probably be global which you definitely dont want, would create some really weird behaviour for users. Will keep thinking about it – Geoff Jun 18 '15 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.