2014-11-20 13:32 GMT+01:00 Jorge Andrés Vergara Ebratt <[email protected]>
:
> Sorry, I hitted send instead of enter...
>
> As I was saying, you can have both images in the server, and have them
> both in the HTML
> 1. img class="big" src="path/to/big
> 2. img class="small" src="path to small"
>
> Then in the CSS you add
> .small {display: none;}
>
> and a media query for small screens
> You can set the media query for the screen size you are going to make the
> change and just swap display none to the big one
>
>
>
> On Thu Nov 20 2014 at 7:26:27 AM Jorge Andrés Vergara Ebratt <
> [email protected]> wrote:
>
>> Actually yo could do it with CSS alone...
>>
>> You can have the 2 images on the server and add both in the html
>>
>>
>>
>>
>> And having the CSS like:
>>
>> On Thu, Nov 20, 2014, 3:59 AM Andreas Kuhne <[email protected]>
>> wrote:
>>
>>> 2014-11-20 9:44 GMT+01:00 Alex Strickland <[email protected]>:
>>>
>>>> On 2014-11-20 08:05 AM, ThomasTheDjangoFan wrote:
>>>>
>>>> do you have a tip for implementing adaptive (responsive) images in
>>>>> django?
>>>>>
>>>>> Basically I want to server smaller images to mobile-users and bigger
>>>>> images to desktop users.
>>>>> I don't really now about best practices for SEO and
>>>>> Siteload-Performance.
>>>>>
>>>>> Are there any apps that you can recon for this?
>>>>>
>>>>> Thanks a lot for your tips!
>>>>>
>>>>
>>>> Have a look at Bootstrap 3, lot's of adaptive stuff (client side
>>>> though, so no real effect on Django).
>>>>
>>>> --
>>>> Regards
>>>> Alex
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/django-users.
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/django-users/546DAA08.8070505%40mweb.co.za.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> Bootstrap only scales the images on other devices, you are still serving
>>> the same size of images to the user (the download size will still be the
>>> same).
>>>
>>> I really don't know anything that will do what you want (you would have
>>> to look at the user agent and serve different images depending on agent). I
>>> think you should be able to use something like the "easy thumbnail" plugin
>>> for creating different sized images for different devices. Don't know about
>>> serving different images depending on device though.
>>>
>>> Regards,
>>>
>>> Andréas
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/CALXYUbn_GZ%2B1%2BFQ%2BDzKgDq_
>>> DP0XidoxGuOQpFF71YH6Tpf7mDw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CALXYUbn_GZ%2B1%2BFQ%2BDzKgDq_DP0XidoxGuOQpFF71YH6Tpf7mDw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAAeX05F40WniWKStonxHO_Tysy0HA4wbmfeqEvjV86o6oqnFmQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAeX05F40WniWKStonxHO_Tysy0HA4wbmfeqEvjV86o6oqnFmQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
That's just the same solution as Bootstrap really.
// Andréas
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CALXYUbkWtBiaoqc1wrmGJ%2Bbz3jEoN46q_wZQaFC-2q31-AZ3wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.