Product Images Low Quality After Updating From WP 3.5 to 4 [closed]
This happened to me. I installed a thumbnail regenerater plugin, this seemed to do the job for me.
This happened to me. I installed a thumbnail regenerater plugin, this seemed to do the job for me.
if (strpos($_SERVER[“REQUEST_URI”], “www.radarhh.com/stage/fr/”) !== 0): The $_SERVER[“REQUEST_URI”] typically doesn’t contain the domain name. And you should be checking if it is zero, since strpos returns the position of the string, or false if it’s not in the string. Try this instead: if ( strpos( $_SERVER[‘REQUEST_URI’], ‘/stage/fr/’ ) === 0 ) : Also, you have this … Read more
You need to hook into the image_send_to_editor filter. This allows you to modify the markup used when inserting an image into the content editor. Something like this should work: add_filter(‘image_send_to_editor’, ‘my_add_rel_nofollow’, 10, 8); function my_add_rel_nofollow($html, $id, $caption, $title, $align, $url, $size, $alt=”” ){ // check if there is already a rel value if ( preg_match(‘/<a.*? … Read more
Instead of your code for image, use this following. <?php $thumb_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 120, 90, true ); ?> <img src=”https://wordpress.stackexchange.com/questions/172495/<?php echo $thumb_image[0]; ?>” alt=”<?php echo esc_html( get_the_title() ); ?>” width=”<?php echo $thumb_image[1]; ?>” height=”<?php echo $thumb_image[2]; ?>” /> Let me explain a little what it’s doing. We are returning PHP array of … Read more
Well if you want to do this yourself first you’ll have to make sure that the form supports enctype: /** Add Encryption Type to User Forms to allow Uploads **/ function profile_form_edit( ) { echo ‘ enctype=”multipart/form-data”‘; } add_action( ‘user_edit_form_tag’ , ‘profile_form_edit’ ); Then you’re going to have to add a new field that allows … Read more
yes, the naming convention for resized images is name-{width}x{height}.extension. Is it good enough info to base a regex on? in practice most likely yes, but in theory no. You just can’t know if mark-20×20.jpg was not simply uploaded that way, and even in places where you know that a resized image should be used you … Read more
I’ve had the same problem and found it was due to the upload file size set for the server (in my case 2mb). There is another setting which escapes me at this point, but is basically a limit on the amount of space that can be used to process uploaded images…which WordPress does when it … Read more
I believe your question is about creating a “favicon”. This is a small image that is served up by your site and appears on each browser tab you may have opened. The WordPress Codex lists a convenient step-by-step on creating a favicon. http://codex.wordpress.org/Creating_a_Favicon Creating a Favicon A favicon can be created using any graphics/image editing … Read more
You’ll need to add a rewrite rule to your .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_REFERER} !/wp-admin/ [NC] RewriteRule ^wp-content/uploads/.+?\.(jpe?g|png|gif|svg)$ /my-page [R=301,L] </IfModule> Add this after anything added by WordPress. You’ll need to replace /my-page with the slug of the page you’d like to redirect to.
This is a screencast from my WordPress 4.1 install: where the image width x height info is visible while we resize the images. This comes out of the box and no magic needed 😉