Import images from self-hosted to WordPress.com
I eventually used this plugin to download and cache all images locally, and replace all links to the local ones.
I eventually used this plugin to download and cache all images locally, and replace all links to the local ones.
UPDATED First, let’s create a new image size. We could update one of the existing sites, but we’ll just add a new one for experience sake. Open up your functions.php file and add the following: if ( function_exists( ‘add_image_size’ ) ) { add_image_size( ‘new-size’, 500, 500, true ); // Cropped add_image_size( ‘another-size’, 400, 600 ); … Read more
Something like this should do it, you may have to fiddle with the preg_replace() to get it to work the way you need, but the concept (and, more importantly imo, the regex, is there). if( is_single() ) { add_filter( ‘the_content’, ‘wpse44503_filter_content’ ); } function wpse44503_filter_content( $content ) { $regex = ‘#src=(“|\’)’. ‘(/images/(19|20)(0-9){2}/(0|1)(0-9)/[^.]+\.(jpg|png|gif|bmp|jpeg))’. ‘(“|\’)#’; $replace=”src=””.get_site_url( $2 … Read more
If you look at the Cache Images plugin’s thumbnails page on the WordPress plugin directory it looks like this feature already exists within the plugin. In the admin section of your site go to Settings→Media there should be an option to cache images when posts are saved.
Sure it is… its a 3 step process.. Check if user is logged in return check and create an if condition return the BIG image link or not at all (right?) The code (not check for user level since subscriber is the lowest level) if ( is_user_logged_in() ) { echo ‘<a href=””><img src=”LINK TO BIG … Read more
It appears that $field[‘custom_image’] isn’t passing what you want it to. The returned values do not appear to be correct. You want to put the key of the meta value you need as the second variable in the get_post_meta() function, for example: $image_upload = get_post_meta($post->ID, ‘_my_image_id’, true); Each custom meta field you create has a … Read more
If your style.css is in /wp-content/themes/themedirectory, and your image is at /wp-content/themes/themedirectory/images/image.jpg, then your css will be this: background-image: url(“images/image.jpg”); You can’t use php in a css file, it will not parse unless included via php (instead of with <link>).
When you upload an image, it’s saved, and a copy is created for every image size, resized to the appropriate dimensions. When you specify a set of dimensions manually, e.g. wp_get_attachment_image_src($id, array(57, 57)) the 57×57 dimensions are compared to the image sizes, and the nearest image size is chosen and that image is returned. So … Read more
Check that your WordPress Address and Site Address are correct under Settings > General. ie., if you want it to be viewable on another computer, this shouldn’t say “localhost” anywhere…
Try RSS, like Magpie RSS – PHP RSS Parser or Google Feed API — Google Developers to pull posts without using WP’s library. Google Groups has forum posts on pulling images, and someone at SO found a way to pull images from Magpie: https://stackoverflow.com/questions/3490740/pulling-images-from-rss-atom-feeds-using-magpie-rss There are lots of other resources via Google.