Why do I have blury images in WordPress

The filter you are using only stops jpeg compression. This does not prevent quality loss when resizing an image. Manually you would apply a sharpen filter afterwards to regain some crispyness in the image. WordPress doesn’t do that. However, WP does have the WP_Image_Editor class for image manipulation. It has some built-in methods, such as … Read more

How to display image in mail header using wp_mail()

The email header is not the same as the <head> of an HTML document (even if that document is an email). So the question shouldn’t be how to display an image in the email header because the answer is that you can’t. Second, the same thing holds true for an HTML document. The <head> section … Read more

WordPress Attachments with old images

To get all featured images belonging to a certain post type, you’d have to get all those posts and the loop through them to get the featured image. Like this: $query = new WP_Query( array( ‘post_type’ => ‘yourposttype’, ‘posts_per_page’=>-1, )); $thumb_list = array (); if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); … Read more

are unattached media files a problem?

There are no real runtime or developmental issues you can run into when having unattached media. The Media Library is a place for you to keep any past or future media ( whether it be images, pdfs, docs, etc. ). You don’t need to go through and ensure that every media is attached to any … Read more

Using a .pdf file as a page in wordpress

just upload it through ftp or your domain hosting panel to your public_html (www) directory. It will be there as a link to www.example.com/myfile.pdf. The case may be that if you have wordpress and installed any security plugins you’ll have to allow the exception within that plugin as well.

Get all custom sizes in srcset attribute

Pfff… I was four hours around this question and.. I got it. Is a very simple issue: original images are smaller than the custom size. So, custom sizes bigger than original images was not created for this images.

Error uploading images in wordpress

It’s usually a permissions error. We used to have these issues on our older servers. As a general rule for file permissions, you should never allow a folder to be “777” (Read/Write/Execute), but the uploads folder on this server, unfortunately, might need it. If you don’t know what I’m talking about, please take a read … Read more