Announcement

Collapse
No announcement yet.

Resize an image according to the user's resolution ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CMS] Resize an image according to the user's resolution ?

    Hello,

    I was wondering if there is a way to resize big images (more than 800*600 px) automatically following the resolution of any user (by using a script, I suppose) ?

    For example, if I'm using a 1024*768 resolution, I cannot view an image that is more than 800*600 because the right side is trimmed.

    I could just upload smaller images BUT I don't want every user have to suffer small images, above all users that have a 23 inches screen...

    I don't know if I'm clear enough

  • #2
    Park this in your additional.css. See if that works for you.
    Code:
    #picturelink img {
    width:100%;
    }
    ...

    Comment


    • #3
      Hi Setishock,

      Thank you for your answer. Unfortunately, it doesn't seems to change anything. But you gave me an idea : I changed the following value in vbcms.css :
      Code:
      .article img {
          border:0;
          overflow: auto;
          max-width:{vb:stylevar image_medium_max};
      }
      by this :
      Code:
      .article img {
          border:0;
          overflow: auto;
          max-width:100%;
      }
      and this works for me many thanks !

      Comment


      • #4
        I'll have to check that out.
        ...

        Comment


        • #5
          Originally posted by Mornagest View Post
          Hi Setishock,

          Thank you for your answer. Unfortunately, it doesn't seems to change anything. But you gave me an idea : I changed the following value in vbcms.css :
          Code:
          .article img {
              border:0;
              overflow: auto;
              max-width:{vb:stylevar image_medium_max};
          }
          by this :
          Code:
          .article img {
              border:0;
              overflow: auto;
              max-width:100%;
          }
          and this works for me many thanks !
          Or instead of editing the vbcms.css template, why not edit the image_medium_max Stylevar?
          Vote for:

          - *Admin Settable Paid Subscription Reminder Timeframe*
          -
          *PM - Add ability to reply to originator only*
          - Add Admin ability to auto-subscribe users to specific channel(s)
          - "Quick Route" Interface...

          Comment


          • #6
            Good question : because I don't want it to be changed in the forum ; only in the CMS

            Comment


            • #7
              Hi again,

              I finally decided to modify the stylevar, according to Trevor's suggestion. I works perfectly but... I still have a little problem with the images size...

              How could I get all images to occupy 100 % of the available space, EXCEPT in static pages in the CMS ?

              The reason is that we need to have a large image (~ 2000x1400 px) with links on it, and since it is resized, links do not move according to the resizing... as the image is a map, it causes a big problem to us.

              I tried to modify several things, to have only articles images to be resized, but it doesn't change anything. I guess my knowledge isn't good enough...

              Any idea ?

              Thank you !

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X