admin管理员组

文章数量:1122832

sorry for the elementary question.

When I'm building a local site on Wordpress, should I be storing my images in an "img" folder and then using CSS "background-image" to show these photos? That way, when I go live, the image root address won't change.

As it stands, I am just uploading each photos and inserting it directly into the post, then styling it with CSS when need be. However, this means I'm getting big, clunky roots that will have to change when I go live (i.e. localhost/corporate/wp-content/uploads/2012/05/1-new.jpeg).

sorry for the elementary question.

When I'm building a local site on Wordpress, should I be storing my images in an "img" folder and then using CSS "background-image" to show these photos? That way, when I go live, the image root address won't change.

As it stands, I am just uploading each photos and inserting it directly into the post, then styling it with CSS when need be. However, this means I'm getting big, clunky roots that will have to change when I go live (i.e. localhost/corporate/wp-content/uploads/2012/05/1-new.jpeg).

Share Improve this question edited May 31, 2012 at 13:34 mcranston18 asked May 31, 2012 at 12:36 mcranston18mcranston18 1052 bronze badges 2
  • Questions related more to CSS and not WordPress specifically should be posted on Stack Overflow. – Joseph Leedy Commented May 31, 2012 at 12:44
  • hey Joseph, because the question related to storing images when building on WP, I figured this would be the right forum? – mcranston18 Commented May 31, 2012 at 13:35
Add a comment  | 

1 Answer 1

Reset to default 1

There are different approaches to managing media. Most common (from my perception) are:

  • making live site master copy of data (not doing any data input in local)
  • use deployment process that takes care of URL change
  • map live domain to local install while working with it
  • store media in third location (another server, Amazon S3, etc)

本文标签: localhostStoring images on a local site