Weird encoded error when using wp_generate_attachment_metadata()

I tracked the error down through several functions to GD’s imagejpeg() function. So I checked the error log and found this: HTTP wrapper does not support writeable connections A quick search found that this resulted from using a full URL instead of a server filepath. So I changed the value of $filepath to use $wp_upload_dir[‘path’] … 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

Admin edit S3 Media file?

1) Use persistent storage that can be shared among all EC2 instances within a region – Amazon Elastic File System OR 2) Give developers access to the AWS console or AWS Command Line Interface to access S3 resources. In addition use AWS Identity and Access Management to limit access; whether it is read-only or read/write. … Read more

Is it possible to enable the ‘Link To’ field under ‘Attachment Display Settings’ for a Featured Image?

Sorry, what you’re looking for is not an standard WordPress feature. It might interfere with the theme, which could be built to already include a link to the featured image. That would lead to invalid html. So you’ll have to build this yourself using the admin_post_thumbnail_html hook, which allows you to add fields to the … Read more

Location of image metadata on my server

The image url is store in wp_posts as an attachment post_type with their corresponding posts(s) as parents. From Codex, see Template Tags Show All Attachments I believe something like this would retrieve all attachments in DB outside of a loop: global $post; $args = array( ‘post_type’ => ‘attachment’, ‘posts_per_page’ => -1, ‘post_status’ => ‘any’, ‘post_parent’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)