WordPress.org

Ready to get started?Download WordPress

Forums

Resizing images (auto posted from external source) (3 posts)

  1. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    I frequently have images autoposted to by blog by external services....thus they are never uploaded to my server.

    Currently I use this to resize them (from my css):

    .entry .posterous_autopost img {
             max-width: 200px;
             width: expression(this.width > 200 ? 200: true);
             max-height: 280px;
             height: expression(this.height > 280 ? 280: true);
             float: right;
             margin: 4px;
    	 border-bottom:3px solid #300707;
             border-right:2px solid #300707;
    	 border-top:3px solid #592222;
             border-left:2px solid #592222;
             }

    So...all I have to work with is that the images will always be within my .posterous_autopost class

    What I've got there is basically my guess as to how to resize things....but it's kinda pieced together, and since the images aren't always going to be horizontal or vertical, dealing with the widths and heights and keeping things proportional has totally thrown me

    The results I am getting are tolerable.....
    http://www.rvoodoo.com/2010/01/untitled/

    basically....am I going about this the right way? Is there a way to do a proportional css resize? Say 40percent of origianl or something? Is there a better way to do this?

    As always, thanks folks!

  2. MAzCastro
    Member
    Posted 4 years ago #

    Hi

    Usually i'only concearned if they have my standart witdh.
    Height was really naver a concearn since it does'nt mess up my layouts in a relevant way, so I never gave it too much tought.

    You could try to pass them trough a php script in your server to resize them proportionaly, like call http://www.mysite.com/resizer.php?http://imageURL.jpg - something like that.

    MAC

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    yeah...I'm not actually concerned about my layout messing up per se, It's just that the photos come in kinda giant, and I can't control that on the autoposter end..... Also, the photos never actually come to my server, and are never hosted locally.....they remain on the autoposter service...er...server

    So am I still able to affect them with a php script? If so, where should I look on how to use the script? I ain't skurred of google, just gotta know what to look for....php image resize script? Guess I'd like to ensure it's possible before I google myself silly

    Thanks all!

Topic Closed

This topic has been closed to new replies.

About this Topic