SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to deal with large uploaded images

    I'm designing my first minimalistic wordpress theme at the moment. It's a simple 2 column layout (sidebar on right). I'm wondering how I should deal with users uploading large images which stretch out further than the content (which underlays the sidebar). Should I leave this up to the user to deal with, or apply a function to limit the image size?

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2010
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Define width and height for img tag... or read this: http://codex.wordpress.org/Function_...add_image_size to add custom sizes.

  3. #3
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, I 'm probably unclear with my question.
    In relation to users displaying images with my theme, what is the best practice for theme designing? Allowing the user to place any size images (e.g. 1200px) or restrict image sizes to a max size?

  4. #4
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,397
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Don't forget that you will often have to educate your clients about working with images. If they don't have any image editing software I usually provide them with a list of software they could use, ranging from Freeware image resizing/cropping tools to full blown editors.

    I don't know if Wordpress does this, but CMS's often come with a facility to check/limit the size/dimensions of an image on upload, if it's too big the CMS will give them a warning and not allow them to upload anything larger than you specify.

  5. #5
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, I know how to restrict the size of images in wordpress, I'm wondering if it's good practice to do it for a free theme for general release?

  6. #6
    SitePoint Guru DocType's Avatar
    Join Date
    Feb 2005
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by decimal View Post
    Yep, I know how to restrict the size of images in wordpress, I'm wondering if it's good practice to do it for a free theme for general release?
    I think it's good practice to give your users both options.

    As stated above, it's important to educate your users, let them know there is a switch they can set to control image size.

    I don't see many themes being written this way, most publishers fill their themes with generic content or Latin text; Why not fill those pages with instructions on how to edit/personalize the theme?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •