on attachment.php, how to display previous and next attachment links that follow the same order as a custom WP Query
on attachment.php, how to display previous and next attachment links that follow the same order as a custom WP Query
on attachment.php, how to display previous and next attachment links that follow the same order as a custom WP Query
How to make attachment tag archive visible on page
Attachment tag archive
This is the wrong approach. Mobile devices are being served the small image because the default sizes attribute is incorrect for your uses case, not because of the srcset. If you provide a correct sizes attribute then browsers will choose a more appropriate source. If you remove the 300w version without changing the sizes attribute … Read more
Give attachments an archive page, and exclude unattached ones
srcset is populated with all sizes of the image that are the same aspect ratio as the original image. The reason smaller images are added to srcset if you upload the exact size is because that means that the default resized versions like medium and large will have the same aspect ratio. However, when using … Read more
How can I use an image from an external source without uploading it to the media library
The WordPress function next_image_link() do accept a second parameter $text which will show up instead of a thumbnail image. Example – <?php next_image_link( false, ‘Next Image’ ); ?>
Stupid me! There was an error in my AJAX call so I was passing the wrong post ID in the second case. So, nevermind guys. (Is there a to delete a question? Can’t seem to find one).
That is the attachment’s data in serialized format. There’s an explanation of the data in the wp_get_attachment_metadata codex entry. If you have some custom function doing image uploading, you can use wp_generate_attachment_metadata to generate that data.