Published on
%2$s in
%5$s ', 'twentythirteen' );
if ( empty( $post_title ) || 0 == $post->post_parent )
$published_text = '
%2$s ';
}}}
Obviously, WordPress expects that the article URL will not always be known, and this is observable. Some attachment pages link back to the article and some do not.
But why is this? It seems kind of random- I can't figure out which scenarios generate an attachment page without the link?
And in any case, why should WordPress not be able to figure out the article URL and always make it available for themes to use?
",webtechmailbag
Unpatched Enhancements,42487,Avoid redundant crops for all Customizer media controls.,,Media,,normal,normal,Future Release,enhancement,new,needs-unit-tests,2017-11-09T17:09:17Z,2019-02-07T21:45:56Z,"In WordPress 4.9, we made use of context metadata to keep from producing redundant crops in the media library for custom headers (see #21819). We should extend this behavior to all other media controls in the Customizer (e.g., custom logos, site icon, etc.).
There are a few parts to the implementation to keep in mind:
1. We should only create one cropped attachment per context for a given site/theme option. So for instance, if a custom logo has already been cropped from an attachment for the theme being customized, we should replace that attachment instead of creating a new one. However, we ''should'' create a new attachment if the crop was created for a different theme (this may not apply to site-level settings).
2. The context of an attachment should be included in the JSON model returned by `wp_prepare_attachment_for_js()` and used to filter contextual crops out of the main media attachment library. However, it would be great if those were ''not'' filtered when you've opened the media library from the context which those attachments are created/selected.",joemcgill
Unpatched Enhancements,57003,Compress original image upload to avoid uncompressed images,,Media,,normal,normal,Future Release,enhancement,new,needs-unit-tests,2022-11-04T20:01:53Z,2023-03-15T15:12:46Z,"When an image is uploaded to WordPress today, WordPress will generate the sub-sized versions using compression with the default quality (e.g. 82 for JPEG). The point of this is to offer smaller versions to achieve better performance with different viewport sizes. The compression here is a significant part of it, as we would not want those smaller sized images to be badly compressed and thus overly large in file size.
A problem (and I would argue oversight) in that approach is that the originally uploaded image is still used as is in many cases, even in the frontend. #47873 introduced the feature to compress ""big"" images in a smaller version, which makes sense, however that is only part of the potential problem here: It can also happen that the original image upload is simply an overly large file, even if the dimensions of the image are smaller than what makes it qualify for a ""big"" image.
This ticket proposes the following:
* Always generate a new image from the originally uploaded image, even when it is not a ""big"" image (potential exception could be PNGs as currently the case, see #48736).
* Once the image has been generated, compare the file size of the new image with the original image:
* If the new image is smaller, use that one going forward, backing up the original image in the same way it already happens as part of the ""big"" image feature.
* If the new image is larger (i.e. the original was already well compressed), delete the new image again and simply keep the original as is.
Given that we already generate an additional image file for ""big"" image uploads, this enhancement would not introduce any concerning overhead. It also does not make any assumptions on the original image quality, it simply compares the results to make a decision which image to keep. In any case, the original image will be kept so it would not be a destructive action either.",flixos90
Unpatched Enhancements,50169,Consistency in Gallery and Image block settings,,Media,5.4.1,normal,normal,Future Release,enhancement,reopened,,2020-05-14T14:24:11Z,2020-07-21T22:10:08Z,"In the Gutenberg repo we have been tracking an issue focused on unifying the Gallery and Image editing experience. Currently, it's a bit disconnected from image settings and this ticket aims to change the Gallery block to create instances of image blocks rather than raw markup
https://github.com/WordPress/gutenberg/issues/11436
From the issue:
Is your feature request related to a problem? Please describe.
Single and gallery options should be similar to each other.
I added one image to a gallery and want to resize it in a similar way to how I resize single images. Not possible. I want to add images by clicking the standard add image media library screen but it only says upload an image. It should be identical to the single image media selection options.
Describe the solution you'd like
I would like to see much more consistency between single image and gallery options. It should be very easy to go from one to the other with similar options. As one begins working with images an expectation is created that image options should be similar between various blocks that handle images.
Single image options
[[Image(http://user-images.githubusercontent.com/5323259/47937002-c17bf600-dedf-11e8-9823-ad596ce22764.png)]]
Gallery image options
[[Image(https://user-images.githubusercontent.com/5323259/47937047-dfe1f180-dedf-11e8-8b08-0db18edc2eb2.png)]]
Single image upload media options:
[[Image(https://user-images.githubusercontent.com/5323259/47937075-ee300d80-dedf-11e8-8bb1-44a47574e2ac.png)]]
Gallery upload media options:
[[Image(https://user-images.githubusercontent.com/5323259/47937095-fbe59300-dedf-11e8-88d9-6dbea7190f78.png)]]
Captions are also different from single images to the gallery.
Top example shows the Gallery and bottom a single image.
[[Image(https://user-images.githubusercontent.com/5323259/47940629-8e3f6400-deeb-11e8-9ff6-cfa71c5daccf.png)]]
Btw
It would also be very helpful to be able to rearrange the gallery images by using drag and drop.
",antpb
Unpatched Enhancements,48485,Custom image size not generated if identical to original size,joedolson*,Media,5.2.4,normal,minor,Future Release,enhancement,accepted,,2019-11-03T09:31:22Z,2024-01-29T20:19:18Z,"When defining a custom image size using `add_image_size` and uploading an image that has exactly the same dimensions of that image size, the new image size is not added. This also means that -- when adding the newly defined image size -- to the Insert Media screen using the `image_size_names_choose`-filter, the custom image size does not appear in the dropdown menu.
Even though I can understand why this happens from a server load / storage point of view, I feel the unexpected behaviour (to end users) is a bigger problem. An even prettier fix would be to detect the custom image size is identical to the original size and map the custom image size URL to the original file URL (e.g. through a symbolic link).
{{{#!php
__( 'Project-foto' ),
) );
}
add_filter( 'image_size_names_choose', 'custom_media_sizes' );
}}}
",brampeerlings
Unpatched Enhancements,43608,Display missing module error for GD when on Media Settings,,Media,4.6,normal,normal,Future Release,enhancement,new,,2018-03-22T06:16:06Z,2019-04-15T18:22:33Z,"When WordPress is installed on a server is [http://php.net/manual/en/book.image.php missing the GD PHP image library], there should be an admin level warning displayed on the Media Settings admin page.
Without the GD module there will be '''no intermediate image sizes created when images are uploaded in the media library''' (the media gallery just uses the full image size by default)
[https://pasteboard.co/Hd2hc9L.jpg Without Admin Notice]
The Media Settings page should display an admin warning / error that tells the user that they're missing that module and without it no intermediate images will be created. The whole page talks about the various images size and without GD none of these settings will be used for anything.
I've created a simple gist that displays an admin notice if the '''GD library isn't loaded''' and the current user is on the '''Media Settings''' page.
[https://pasteboard.co/Hd2hVdk.jpg With Admin Level Notice]
[https://gist.github.com/simonrcodrington/be60b6daae0b966a559878c4ba16d9d0]
This has come up a few times now where images haven't been created in the media library and no one has known why. Sometimes hosting providers don't include this extension or they are just not loaded. Having an admin level notice here would make sense.
",simonrcodrington
Unpatched Enhancements,21714,Enable Intermediate choice in UI if Full Size Image is exact match to Intermediate Image,,Media,3.4.1,normal,normal,,enhancement,new,,2012-08-28T15:56:09Z,2020-01-15T01:49:54Z,"
This is simply a minor usability enhancement for Media Gallery. If an image is uploaded that is exactly the same size as an intermediate image (300x300 = Medium for example) it is not a choice when inserting that image into a post. It would be nice if it was a choice pointing to the full/original image since full is the same size as the intermediate.
It seems to be caused in the image_downsize function in /wp-includes/media.php because image_get_intermediate_size returns false.
I believe image_downsize can be updated as such to provide this enhancement:
Line 162 (if statement) Currently:
{{{
if ( !$width && !$height && isset($meta['width'], $meta['height']) ) {
// any other type: use the real image
$width = $meta['width'];
$height = $meta['height'];
}
}}}
could be updated to read the intermediate width and height and set intermediate to true if it is an exact match to the original image:
{{{
if ( !$width && !$height && isset($meta['width'], $meta['height']) ) {
// any other type: use the real image
$width = $meta['width'];
$height = $meta['height'];
// add check for real image being exact match to intermediate image to enable intermediate choice in UI
if (isset($_wp_additional_image_sizes[$size])) {
$goal_width = intval($_wp_additional_image_sizes[$size]['width']);
$goal_height = intval($_wp_additional_image_sizes[$size]['height']);
} else {
$goal_width = get_option($size.'_size_w');
$goal_height = get_option($size.'_size_h');
}
if ($width == $goal_width && $height == $goal_height)
$is_intermediate = true;
}
}}}
Thanks for considering, and hope I put this in the right place,
Andrew
",andrewteg
Unpatched Enhancements,35775,Enhancements: add_post_thumbnail_image_size / wp_get_attachment_id,,Media,,normal,normal,,enhancement,new,,2016-02-08T14:14:08Z,2019-06-04T20:22:23Z,"Hello,
I hope I am in the right place here to suggest two enhancements for WP core.
1:
From my perspective the most used image of a post is the post-thumbnail. I use this post thumbnail quite often in different sizes - for teasers, related posts, sliders etc. From a performance perspective I always want to deliver the image in the correct dimensions. No 1600px image in a related post section where the image is 200px wide etc. I am struggling a bit because I often work on websites which have a lot of pictures in their posts. When I add a new image size its always relevant for all images which are uploaded to WP and often they are not necessary. I do not need a 200px wide image of 20 images which are used in the post - I only need it for the post-thumbnail. From that perspective I would like to have another function than add_image_size - for example: add_post_thumbnail_image_size which is only triggered when somebody selected an image as the post-thumbnail. This will save space on the servers as well.
2:
Sometimes I have the case that I need the attachment ID of an url that has been uploaded. For example: I delevoped a plugin where an image can be chosen, the input field is a text field for a URL. In that case I need to determine the attachment ID to have access to all the necessary WP functions. In this case I built my own function that does it, but I think it will also be a function that can be helpful if it is integrated in WP.
Looking forward to your reply.
In order to always get the image in the correct dimensions which are ",torben.tschechne@…
Unpatched Enhancements,34367,Image Editing: Orientation-aware rotation icons,,Media,,normal,normal,Future Release,enhancement,reviewing,,2015-10-20T05:38:51Z,2019-06-04T20:17:04Z,"Having just processed a massive set of images and needing to rotate several of them, I noticed a small issue with the way the WordPress image editor's rotation icons work. They're generally much better than the standard rotation arrows you'd normally see, providing a visual of an image being rotated one way or another from portrait to landscape. But if you're looking at a landscape image that needs to rotate one way or the other, it's somewhat disorienting trying to decide which button to push, since you're essentially rotating it one more time past the orientation indicated in the icon. By contextually adjusting these icons to reflect the orientation of the image in the editor, we could eliminate an extra cognitive step during the image editing process (see proposed screenshots).
Probably the easiest way to go about fixing this would be to add a class for the image's orientation somewhere in a container div, then add some css to rotate these buttons when the image is already landscape, so that they indicate that clicking would make them rotate into portrait orientation.",celloexpressions
Unpatched Enhancements,32313,Image upscale as Media's settings option,,Media,4.3,normal,normal,,enhancement,new,,2015-05-08T13:58:11Z,2019-06-04T20:13:19Z,"Hello,
I had to searching for hours to find image upscale (because unusually keyword for me as non-English). I am creating new school's website and custom featured images are up to 1200px width (in fact ~876px when with sidebar), however old images are only 800px width and I had problem with deal it.
I found so simple solution to set image to required width/height if not enought, then crop.
{{{
/* Thumbnail upscale
/* ------------------------------------ */
function alx_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){
if ( !$crop ) return null; // let the wordpress default function handle this
$aspect_ratio = $orig_w / $orig_h;
$size_ratio = max($new_w / $orig_w, $new_h / $orig_h);
$crop_w = round($new_w / $size_ratio);
$crop_h = round($new_h / $size_ratio);
$s_x = floor( ($orig_w - $crop_w) / 2 );
$s_y = floor( ($orig_h - $crop_h) / 2 );
return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
}
add_filter( 'image_resize_dimensions', 'alx_thumbnail_upscale', 10, 6 );
}}}
[http://alxmedia.se/code/2013/10/thumbnail-upscale-correct-crop-in-wordpress/]
In my opinion it should be included as option for each/globally for image sizes in Media's settings page and also as fifth parameter for add_image_size(), because this can make big headache.
Greetings",odie2
Unpatched Enhancements,21810,Improve intermediate image size handling,,Media,3.5,normal,normal,,enhancement,new,,2012-09-05T20:28:14Z,2019-06-04T20:03:44Z,"When discussing the new media workflows on #21390, the need to improve our image size API became apparent.
A quick overview of the improvements that should be made:
* All image attachments have an original, or ""golden master"", which is never altered.
* An image size creates a new image and stores all transformations applied to the image as metadata. Transformations are described relative to the golden master. An image size has a unique slug (which means a set of dimensions does *not* have to be unique).
* Image attachments have a ""master"" image size, which is used to create any automatically generated image sizes.
* Automatically generated image sizes can be overridden with manual transformations.
Would love for someone to step up on this ticket, as the media modal editing UI will benefit greatly from these improvements.",koopersmith
Unpatched Enhancements,53013,Improve media library grid management tools,joedolson*,Media,,normal,normal,Future Release,enhancement,accepted,,2021-04-09T19:07:03Z,2023-10-18T16:18:07Z,"The list view & the media modal both support bulk selection tools that aren't available in the media library's grid view.
We should explore ways of moving the media grid view towards greater feature equivalence with these other views, including options such as:
- One-click deletion
- Select multiple items
- View attachment titles (helps differentiate between two versions of an image)
- Copy URL for attachment
Prompted by #51363. While a custom context menu is not something we consider to be viable for accessibility reasons, the intent of that ticket is definitely worthwhile. ",joedolson
Unpatched Enhancements,31395,"Indicate difference of two visually equal, but otherwise different images in non-list media views",,Media,4.0,normal,normal,,enhancement,new,,2015-02-20T18:19:09Z,2023-10-18T16:17:30Z,"As explain in #24566
> [...] if I have two images that look identical the only way to differentiate between them is click each of them and read their properties in the properties section.
One possible solution would be to show the title/file name of the image and/or the file size.",F J Kaiser
Unpatched Enhancements,39618,Insert PDF Thumbnail into Editor,,Media,4.7,normal,normal,Future Release,enhancement,new,,2017-01-17T22:00:29Z,2019-12-09T15:38:51Z,"[38949] is awesome, but the next logical move is to allow content editors to easily insert the PDF thumbnail into the Editor upon Insert Media.
There will need to be a UI for allowing the content editor to choose whether to insert the image or the textual link. The easiest place for this to live without a major UI overhaul would be in the Insert Media workflow itself.
In fact the ""Size"" pull-down menu doesn't really do anything right now for PDFs, so it would be a good place to add an option ""Document Link Only"", and then honour the other sizes when selected and actually insert the image.
",tomauger
Unpatched Enhancements,55840,Internationalization support for sizes added by 'edit_custom_thumbnail_sizes' filter,antpb,Media,6.0,normal,normal,Future Release,enhancement,assigned,dev-feedback,2022-05-26T08:33:48Z,2024-01-29T20:35:15Z,"The image size labels added by the edit_custom_thumbnail_sizes filter are not internationalized.
{{{
"">
}}}
In a Japanese environment, there will be a mixture of translated and untranslated text.
To solve this problem, the following size of translated text is prepared before the loop process.
{{{
$size_names = array(
'thumbnail' => __( 'Thumbnail' ),
'medium' => __( 'Medium' ),
'medium_large' => __( 'Medium Large' ),
'large' => __( 'Large' ),
'full' => __( 'Full Size' ),
);
}}}
Change the following where labels are output.
{{{
"">
}}}
Since image size labels are also used in the ""image_size_input_fields"" function, etc., it may be better to make them a function rather than an array.
In addition, the translated text for ""Medium-Large size image height"" and ""Medium-Large size image width"" exists, but the translated text for ""Medium Large (or Medium-Large)"" does not.
If you are conscious of word commonality, ""Medium-Large"" may be better than ""Medium Large"".
",tmatsuur
Unpatched Enhancements,28750,Media modal: preview images,,Media,,normal,normal,,enhancement,new,,2014-07-04T21:00:03Z,2019-06-04T20:08:29Z,"I'm not sure if this has been talked about before, but with FileReader we could preview images in the media modal.
https://developer.mozilla.org/en-US/docs/Web/API/FileReader
I've made a quick patch to try it, but it's far from perfect... It sometimes flickers and the reading seems to block js from executing further, so not ideal for uploading a ton of images at the same time. Still, I'm sure we can get this to work smoothly somehow.
I'll attach a screenshot. I think this would be a really cool experience. :)",iseulde
Unpatched Enhancements,40124,Media on uploading only gives me edit options,,Media,,normal,normal,Future Release,enhancement,new,,2017-03-12T12:32:20Z,2023-09-05T15:07:41Z,"This shows on mobile but is also desktop issue.
[[Image(https://cldup.com/_ZB6QmO5gZ.PNG, 50%)]]
Says 'edit' but doesn't give me option to view or delete.",karmatosed
Unpatched Enhancements,43227,Media uploaded to post should remove underscores and hyphens from text inserted into title attribute,,Media,,normal,normal,Future Release,enhancement,new,,2018-02-05T11:04:43Z,2023-02-02T16:29:19Z,"When adding a new image into a post my file name will typically be called something like:
descriptive-name-of-image.jpg
Once this image is uploaded wp will automatically set the title and will default to the name of the image ""descriptive-name-of-image"" if no title meta data is available in the image.
I think a better default action would be to replace the hyphens/underscores with spaces and possibly capitalising the first letter making the title ""Descriptive name of image"".",mrmadhat
Unpatched Enhancements,28321,"Media uploader confuses user with description, caption, alt and title, without explanation",,Media,3.5,normal,normal,,enhancement,new,,2014-05-21T08:07:21Z,2023-10-18T16:08:48Z,"After a decade using WordPress, I still scratch my head when confronted by the media uploader, with its offer for me to enter for each of my images a ""Title"", a ""Caption"", some ""Alt Text"" and a ""Description"".
As a developer, I can just about figure that out - title and alt text correspond to the HTML attributes. Playing with caption shows that it adds a visual caption. Description? Not sure what that gets used for.
Admittedly, I don't work a lot on content creation. I work more on internals. On the other hand, someone who does work on content creation might not have the knowledge of HTML attributes, so they might be worse off.
There's no help that appears if you mouse around the labels, that explains what they're for.
In summary: the bug is that there are four separate ways to describe your media upload, and no obvious link to any help to explain how these four are distinguished.",DavidAnderson
Unpatched Enhancements,33773,"Media, Featured Images: The media modal doesn't remember filter settings in the context of featured images",,Media,4.3,normal,normal,,enhancement,new,,2015-09-07T21:46:15Z,2024-01-28T09:18:20Z,"https://make.wordpress.org/flow/2015/09/07/media-featured-images-setting-the-featured-image-on-an-old-post-macnchrome/
A thread on #23205 discusses featured image flow through the media modal. There are requests that the filter in the media modal remember the “uploaded to this post” filter setting independently for the featured image flow.
Considerations:
* “Uploaded to this post” requires that the image be attached to a post. Images uploaded through the media modal from the editor are attached to the post, but images uploaded directly to the media library are not attached and don’t get attached later when added to a post. We could use some API for pulling images out of post content, like we do with some other media types. See related discussions on #23041 ""Images Don't Become Attached When Inserting a Gallery"" and #32622 ""Make the text of the Image delete AYS dialog clearer"".
* If no images are attached to the post, the filter should be set to show all images.
",ryan
Unpatched Enhancements,22894,Need WordPress Media Uploader Stop or Cancel Button in WP Version 3.5,,Media,3.5,normal,normal,,enhancement,reopened,,2012-12-12T17:34:01Z,2023-10-18T16:05:38Z,"Today I was testing the new media uploader of WP 3.5 from post editor by clicking 'Add Media'. I clicked 'upload files' and I choose a big file from my computer by a mistake. But I did not want to upload that file. Then I wanted to cancel the uploading, but there is no stop or cancel button . Then I close the popup window and open again by clicking 'Add Media' button. I see the previous file is being uploaded yet. I choose another small file and both files upload are running.
[[Image(http://onetarek.com/wp-content/uploads/2012/12/stop-media-uploader.jpg)]]",onetarek
Unpatched Enhancements,29687,Original image should be visible in media-library after image-processing,,Media,4.0,normal,normal,,enhancement,new,,2014-09-16T16:46:47Z,2019-06-04T20:09:15Z,"After editing an image in the library, e.g. after cropping and saving the resulting image will be shown in the library. At this time the original-image was not deleted or overwritten, because it could be used before the processing.
It would be very fine if this original-image appears again:
1. someone could use the whole (uncropped) version again.
2. you are not able to delete this image completely from the server without using FTP",arkonisus
Unpatched Enhancements,30876,Paste an image into the Media Library,,Media,,normal,normal,Future Release,enhancement,new,,2015-01-01T00:12:16Z,2018-03-30T22:44:19Z,Github has some nice UX where you can paste an image into a comment. It would be nice if the Media Library supported something similar.,danielbachhuber
Unpatched Enhancements,55535,Pre-populate Image Alt Text field with IPTC Photo Metadata Standard Alt Text,joedolson*,Media,,normal,minor,Future Release,enhancement,accepted,dev-feedback,2022-04-05T21:45:25Z,2024-02-05T20:52:37Z,"The IPTC Photo Metadata Standard includes the ability to embed Alt Text with a photo.
Seems like it would be helpful if WordPress would check for this data when an image is uploaded, and, if it exists, pre-populate the Alt Text field with it.
I could see this being especially useful for site owners who purchase stock photography; if the alt text is embedded with those images, it would save the site owner time, and it would also help ensure that an Alt Text itself is added -- and is an accurate description of the image (assuming the photographer or stock photo site actually enters a good description!).
http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#alt-text-accessibility",eatingrules
Unpatched Enhancements,22938,Presentation of hierarchical taxonomy in Media modal should be checkboxes rather than comma-separated tag list,wonderboymusic,Media,3.5,normal,normal,Future Release,enhancement,assigned,,2012-12-14T14:10:16Z,2018-09-24T08:07:27Z,"Since 3.5, using register_taxonomy_for_object_type on attachments, if the taxonomy used is hierarchical, whereas in the edit attachment UI you see the normal list of checkboxes, in the corresponding modal it is presented as a comma-separated list of slugs, as if it were a non-hierarchical taxonomy (tags rather than categories). I'm sure this is not a bug / mistake / oversight, but at best it's a little unintuitive (you need to have memorised the category slugs to add new ones) and worst a bit dangerous (risk of adding unwanted categories), and it would be great if in future it was presented here too as a list of checkboxes. ",yeswework
Unpatched Enhancements,41462,Promote media details admin page to full post page,,Media,4.9,normal,normal,Future Release,enhancement,new,,2017-07-27T17:43:26Z,2023-10-18T16:01:34Z,"Currently when editing media metadata, you either get the modern library modal with the image on the left and various fields on the right. When you click ""Edit more details"" you get a blast from the past with an old-school version of WordPress admin where everything looks uninspired and, for new users, broken.
Based on user feedback it turns out some site owners use the Attachment Page feature to provide contextual info, commenting, etc for media items. One example was a teacher who uploaded student images to a gallery, then had each image link to the attachment page where further information and images were provided in the ""description"" field (so the post content) and parents could leave comments.
Since media items in reality are full fledged posts with their own post content, the media details admin view should be upgraded to a full post page with proper WYSIWYG editing for the Description field, custom fields, and ability to control things like commenting.
This would also be an ideal place to visualize in what posts a media item is in use across the site.",mor10
Unpatched Enhancements,57459,Reexamine the usefulness of file size meta for images,,Media,,normal,normal,Future Release,enhancement,new,,2023-01-13T21:41:10Z,2023-01-21T00:09:08Z,"Storing of the file size for images was added in #49412 without it being used in core and with pretty marginal use case(s) expectations:
Storing file size means, developers will not have to resort to doing filesize function calls, that can be time consuming on assets on offloaded to services like Amazon’s S3.
#49412 also mentions some serious drawbacks:
- Image filesize meta is missing for all previously uploaded images.
- It is unreliable as seemingly many hosting companies optimize images directly on the disc, without running WP, hence the cached file size becomes outdated/wrong soon after images are uploaded.
- Many sites replace JPEGs with WebPs on the fly, making the stored file size unusable.
In that terms the cached image file size seems too unreliable to even fulfill the expected use in plugins. Furthermore not being useful in core, and the additional overhead when uploading images seems to make it a poor addition.",azaozz
Unpatched Enhancements,20602,Replace media,,Media,3.3.1,normal,normal,,enhancement,reopened,,2012-05-02T13:29:45Z,2023-10-18T23:58:59Z,"I have been developing themes for clients lately that require the same image across the theme in varying places. A good example is an event site where the image is a badge/sticker showing the price of the tickets. This gets output on various pages in varying locations.
get_attachment_link is perfect as I can plugin a single ID and use the graphic wherever. However, the ticket prices change as the event gets closer and the graphic needs to be updated which breaks the theme in production when my client does so as a new ID is generated.
This doesn't make too much sense to me. I've worked with and developed CMSs of all kinds and usually the ID is preserved.
I would at least like the option, perhaps a checkbox, to indicate I want to reupload a new image. I think it's more common that an update on a media item would be to modify the same logical graphic rather than just replacing it with something entirely new.
I found the following plugin but I feel this really ought to be core.
http://wordpress.org/extend/plugins/enable-media-replace/
Thanks for your consideration.",PorridgeBear
Unpatched Enhancements,11877,Resized Images lose their EXIF data,,Media,3.0,normal,normal,,enhancement,reopened,,2010-01-12T10:47:55Z,2019-06-04T20:01:51Z,"The thumbnail, and medium re-sized images do not keep EXIF data of the original image.",thee17
Unpatched Enhancements,32459,Send custom metadata alongside a file upload via the media uploader,,Media,4.2.2,normal,normal,,enhancement,new,,2015-05-21T18:53:13Z,2019-06-04T20:14:00Z,"As WordPress has evolved into a very powerful CMS, responsive layouts and high-resolution screens are growing more and more common. It's not uncommon for large sites to register several additional image sizes, and adding 2X support doubles the number of images created behind the scenes.
It would be nice for plugins to be able to have more granular control over the sizes that are created when an image is uploaded.
An example: a company Team page features portraits for each employee. Only two sizes are needed: 250x250 and 500x500 (2x). Meanwhile, the rest of the site has nearly a dozen custom image sizes. When the portraits are uploaded, a dozen sizes are created, but only two are needed. Similarly, registering these two new sizes registers them for every image uploaded to the site.
In a plugin like Advanced Custom Fields, I'd like to be able to tell the uploader to skip all of the built-in sizes and hand-pick the sizes I do want to create.
In other words, a new set of sizes would need to be registered that aren't automatically included in the global set of image sizes, but are available for plugins to select and send to the uploader. The uploader could be given a special set of sizes when it's opened, and those special sizes can be fetched from the theme.
To be clear, I'm not talking about generating new image sizes when the theme requests them. This request is for overriding the sizes that the uploader applies to a new image.
I've explored the built-in functions and hooks and filters, but it doesn't appear there's a way to override the sizes that are created in the way I describe.",danphilibin
Unpatched Enhancements,31283,Setting poster image for videos inside a video playlist is not very intuitive,,Media,4.2,normal,normal,,enhancement,new,,2015-02-10T15:43:13Z,2019-06-04T20:11:16Z,"This is somehow a follow-up to #27891.
When you create a video playlist, it's very hard to understand how to change the poster images of the videos.
Here is the workflow :
1. Upload some videos
1. Create a new article and insert one single video
1. Edit the inserted video to open the media modal again, and select a poster image for your video
1. Nice !
1. Create another article and insert a video playlist
1. When you choose video, the one that was inserted in the previous article is shown with the poster image instead of the default video icon : very nice !
1. For other videos, there is no way to select a poster image, neither during initial playlist creation, nor after having inserted the playlist :-(
1. To select a poster image, you have to go back to the main Media menu, find the right video and edit its details, and then set the featured image (that you guessed it was the same as the poster image)
I see at least three ways to improve that workflow.
1. In the ""Edit video playlist"" modal, add a ""Select poster image"" menu, similar to the one that exists in the ""Video details"" modal for the video shortcode.
1. When browsing videos in the media modal, add a link to set the poster image, in the same manner that the ""Edit image"" link works for images
1. When browsing videos in the main Medias menu, add a link to set the poster image, in the same manner that the ""Edit image"" link works for images
1. Bonus : change ""Featured Image"" title to ""Poster image"" in the video attachment post edition page
1. Big Bonus : when browsing videos in the main Medias menu, add a button ""take a screenshot and set as poster"" when a video is shown. This will load the video into a canvas, generate an image from this canvas, send the image to the server and set it as poster !
",Fab1en
Unpatched Enhancements,55036,Sharpen thumbnails with Imagick adaptiveSharpenImage(),antpb,Media,5.9,normal,normal,Future Release,enhancement,assigned,close,2022-02-02T04:58:14Z,2023-05-10T15:13:27Z,"The Imagick function `resizeImage()` often produces thumbnails with a low visual quality (blurry/grainy). The world is moving to small high-resolution devices, where visual quality makes a difference, and we need something better.
Fortunately, `adaptiveSharpenImage()` (see https://www.php.net/manual/en/imagick.adaptivesharpenimage.php) sharpens the subject/foreground of the image, while not sharpening the background (as much).
I've tested it with various `sigma` values, and `1` got me a nice enough result (`radius` was `0` == auto). However, it would be good to test ranges of image sizes and ranges of scaling ratios (original size / thumbnail size) to find out more.
For even more flexibility, there should be filters on the default values of `radius` and `sigma`. This will allow developers to have finer control on specific sites that need a bit more.
Alternatively, `add_media_size()` can be extended to accept `radius` and `sigma`, which can then be used during thumbnail generation. This will also be a convenient way for developers to update the sharpening settings of existing media sizes.
Option: when Imagick is used, add `radius` and `sigma` fields to the definition of image sizes in Settings > Media -OR- in the customizer for site-specific control without coding.
See also: #40415",galbaras
Unpatched Enhancements,31715,Small UI redesign proposal for media uploader,,Media,4.1.1,normal,normal,,enhancement,new,,2015-03-20T17:50:29Z,2019-06-04T20:12:17Z,"Right now, when adding images to a post, you get an 'Insert Media' dialog (or 'media grid') where you can drag and drop files to upload. Perfect, so far.
However, if you want to ''manually'' select some files via file chooser, you have to click another tab, and then click again on a button to launch the file chooser. If you use it a lot, that extra click can become a bit annoying.
My proposal would be to remove that extra 'Upload Files' tab and just add a simple 'Select Files' button on top of the Media Grid dialog.
See attached mockup.
That would be self-explanatory and quicker to use, and we could get rid of the tabs.",jorgetoledo
Unpatched Enhancements,49830,Store rotation data for uploaded videos,,Media,,normal,normal,Future Release,enhancement,new,,2020-04-06T17:44:17Z,2022-03-10T15:57:25Z,"If the video format supports and the data is found in the exif data, store the rotation angle in video metadata.",spacedmonkey
Unpatched Enhancements,37255,Update attachment functions to accept a post object in addition to ID,johnbillion*,Media,4.6,normal,normal,Future Release,enhancement,accepted,close,2016-07-02T09:26:02Z,2023-04-26T21:37:20Z,"Some WordPress functions accept the $post object as parameter instead only the $post_id.
Since most of the time we write our code within the loop or we use the $post object, could be an improvement to standardize the functions that require a post id even support the $post object?
For the wp_get_attachment_caption for example, could be like this:
{{{
/**
* Retrieves the caption for an attachment.
*
* @since 4.6.0
*
* @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
* @return string|false False on failure. Attachment caption on success.
*/
function wp_get_attachment_caption( $post = null ) {
if ( ! $post instanceof WP_Post ) {
if ( ! $post = get_post( $post ) ) {
return false;
}
}
if ( 'attachment' !== $post->post_type ) {
return false;
}
$caption = $post->post_excerpt;
/**
* Filters the attachment caption.
*
* @since 4.6.0
*
* @param string $caption Caption for the given attachment.
* @param WP_Post $post Attachment object.
*/
return apply_filters( 'wp_get_attachment_caption', $caption, $post );
}
}}}
The get_the_post_thumbnail_caption that use the wp_get_attachment_caption accept the $post object.
Also, instead of passing the $post->ID to the wp_get_attachment_caption, use the $post object, so we can work directly with the object instead of calling again the get_post function to retrieve it.",wido
Unpatched Enhancements,31419,Vimeo and YouTube video cannot be inserted into a playlist,,Media,,normal,normal,,enhancement,new,dev-feedback,2015-02-23T09:22:58Z,2019-06-04T20:11:41Z,"Now that the video playlist feature is working well in core, it could be great to think about supporting Vimeo and YouTube videos inside playlist.
For the record, YouTube videos can be played with the MediaElementJS player with this shortcode :
{{{
[video src=""http://youtu.be/_YbVJoMYwJ0""]
}}}
I would like to introduce the possibility to play this video inside a playlist:
{{{
[playlist type=""video"" srcs=""http://youtu.be/_YbVJoMYwJ0,http://youtu.be/Fn1iMmSvvhQ""]
}}}
Now, there are some challenges :
1. Playlist are managed by selecting attachment form the Media library, along with their meta data (title, poster, ...). How to provide meta data for external videos ?
2. MediaElementJS does not build the player in the same way when a YouTube video is embeded, so switching between videos does not rely on the same API, and switching between YouTube and mp4 videos is not possible
The first concern could be addressed by registering an attachment post in the database that links to a YouTube URL instead of a video located in the uploads folder.",Fab1en
Unpatched Enhancements,41977,media_handle_upload() un required second parameter,antpb,Media,2.5,normal,normal,Future Release,enhancement,assigned,,2017-09-25T14:21:04Z,2023-02-07T06:26:41Z,"Why second parameter of `media_handle_upload( $file_id, $post_id )` is required?
It's better to define it as 0 and make it optional. In some cases it's more convenient! And we lose nothing if do so...",Tkama
Unpatched Enhancements,30377,wp_check_filetype is broken when checking urls with parameters,audrasjb,Media,4.0,normal,normal,Future Release,enhancement,reopened,,2014-11-18T05:05:03Z,2022-04-08T04:24:45Z,"The function in ./wp-includes/media.php named wp_check_filetype has a bug.
It works properly when checking a url such as http://example.org/coolfile.mp4 but as soon as you add parameters to it (a common practice when attempting to embed un-cached or amazon pre-signed urls) like so: http://example.org/coolfile.mp4?extra=true¶ms=true ... it fails to return the extension / content type.
The fix for this should be *very* easy. The preg_match in this function that looks like this currently:
{{{
$ext_preg = '!\.(' . $ext_preg . ')$!i';
}}}
could be adjusted to ignore the query string (if there is one) and just return the true extension like so:
{{{
$ext_preg = '!\.(' . $ext_preg . ')(\?.*)?$!i';
}}}
I've tested this change in my local environment and it works great.
",supercleanse
Unpatched Enhancements,30180,wp_get_attachment_image_src does not return alt or meta,antpb,Media,,normal,normal,Future Release,enhancement,assigned,,2014-10-29T18:42:55Z,2023-07-21T15:37:32Z,"In practical use,wp_get_attachment_image_src is very useful for displaying an attached image - but requires a separate call to get any other image meta or the alt attribute.
In addition to making any application that needs alt attr or meta data for display simpler, having the alt attribute present in this function increases the likelihood that developers will use the alt attribute in their ultimate output.
",joedolson
Slated for Next Release,58051,Attachment custom fields not rendered after upload,antpb,Media,6.2,normal,normal,6.6,defect (bug),assigned,,2023-04-02T02:23:40Z,2024-03-06T16:20:39Z,"This is a follow-up to #40909.
Attachment custom fields added via `attachment_fields_to_edit` are no longer rendered just after an image is uploaded.
Clicking away and back will restore the custom field markup, but is quite inconvenient.",trepmal
Slated for Next Release,54091,Attachment details pane navigation not working after opening 81st (or greater) item and refreshing the browser,antpb,Media,5.8,normal,trivial,6.6,defect (bug),assigned,dev-feedback,2021-09-08T19:02:34Z,2024-03-27T15:26:10Z,"Setup:
- clean 5.8;
- twentytwentyone active;
- no plugins active.
Steps to reproduce:
- open media page;
- click on the 41st item in the list;
- notice the left arrow is enabled (which is to be expected, since there are previous items);
- refresh the page.
Notice the left arrow now - it's disabled.
Not sure if this is intended, but since the item isn't loaded (in the grid), there's no previous but there's only next, which points to the first item. Clicking the right arrow goes to the it and you can't go back to the previous item.",ppetrov2c
Slated for Next Release,60548,Image editor: improve the browsePopup function,joedolson*,Media,6.3,normal,normal,6.6,defect (bug),accepted,,2024-02-15T14:10:11Z,2024-03-06T16:59:58Z,"While auditing all the remaining jQuery deprecations still to address in core, I noticed a couple things that offer room for improvements in the `browsePopup` function of the core image editor.
1. The `browsePopup` function uses the `window.event` property, which is deprecated and should not be used. This is the `global` event. Instead, the event should be passed as a function parameter. Aside: instead of using inline events, it could have been better to consider a more modern approach.
2. When using the keyboard to navigate the items in the 'Image rotation' dropdown menu, the page scrolls. See attached animated GIF. There's some code in place to prevent page scrolling you may need to reduce your viewport height.
See [55919] / #50523
",afercia
Slated for Next Release,59577,Images in block templates or patterns do not have loading optimization attributes,flixos90,Media,,normal,normal,6.6,defect (bug),assigned,,2023-10-09T19:12:23Z,2024-03-13T15:41:15Z,"This ticket is created as a break out from #59464: While that ticket was also initially pointing out the lack of loading optimization attributes in TT4, it has been primarily focused on the lack of the dimension attributes `width` and `height` from images that are hard-coded in the theme (e.g. in a `core/image` block within the theme's block templates, template parts, or patterns).
As noted in https://core.trac.wordpress.org/ticket/59464#comment:16 however, there is another arguably more severe problem: Even if that bug was fixed for TT4, most of those images ''still'' wouldn't receive the loading optimization attributes. That is because TT4 includes most of its images directly in block templates, or in patterns, outside of template parts, post content, or widget content.
Currently, any images that aren't covered by more specific contexts than `template` (which is for the overall block template) are not handled at all by `wp_filter_content_tags()`, impacting TT4 and likely several other block themes. This ticket is focused on that problem, trying to identify a solution to also consider images in the overall block template, while avoiding duplicate processing of images that were already processed with a more specific context.",flixos90
Slated for Next Release,59638,Images: repeating a single image causes `fetchpriority` to be repeated,,Media,,normal,normal,6.6,defect (bug),new,dev-feedback,2023-10-16T20:02:35Z,2024-02-17T13:41:06Z,"I noticed a small bug in how core auto-applies the `fetchpriority=""high""` attribute. This feature aims to add this attribute only to the LCP image, which is frequently the first large image in a layout.
The bug is this: if a user inserts a single image several times, every instance of the image will have the `fetchpriority=""high""` attribute.
=== Steps to reproduce
1. create a new post
2. insert a large image at the top of the post
3. Insert the image several more times, so the post now contains several copies of the image.
4. save and view the post source code
**Expected result:**
The first large image contains the `fetchpriority=""high""` attribute.
**Actual results:**
Each copy of the image contains the `fetchpriority=""high""` attribute.
=== Notes
I am posting this here because it feels like a bug, even though I'm not sure we should fix it:
- The image URL for each item is the same so there may be zero impact to repeating the attribute (the same URL is prioritized). Unless there is a case where the actually fetched image from the srcset could be different for two copies of the same image?
- There could be a slight negative performance impact when fixing this since the repetition is the result of an optimization where we only consider each unique image once.",adamsilverstein
Slated for Next Release,27914,Information about image is jumping in media modal,joedolson*,Media,3.5,normal,normal,6.6,defect (bug),accepted,has-patch,2014-04-19T11:58:57Z,2024-03-01T22:03:35Z,"When changing title or caption, changes are saved automatically, but information about image is jumping and it is very distracting. It is caused by ""Saved."" message which is displayed for a sec. See attached screenshots.",pavelevap
Slated for Next Release,60798,Investigate potentially failing Imagick PDF alpha channel test,,Media,,normal,normal,6.6,defect (bug),new,dev-feedback,2024-03-18T11:30:17Z,2024-03-27T15:27:25Z,"The test `\Tests_Image_Editor_Imagick::test_remove_pdf_alpha_channel_should_remove_the_alpha_channel_in_preview()` was introduced in #39216 / [56271].
On some hosting providers, this test appears to be failing with errors such as this:
{{{
Tests_Image_Editor_Imagick::test_remove_pdf_alpha_channel_should_remove_the_alpha_channel_in_preview
The intermediate size could not be retrieved.
Failed asserting that false is of type ""array"".
/tmp/wp-test-runner/tests/phpunit/tests/image/editorImagick.php:680
}}}
Examples:
https://make.wordpress.org/hosting/test-results/r57849/wpsabot-r57849/
https://make.wordpress.org/hosting/test-results/r57848/wetopibot-r57848/
We should investigate this failure to see whether it's an issue in core or with the hosting provider.
The test mentions ""Ghostscript version >= 9.14"", so maybe it's just a matter of skipping the test if the installed Ghostscript version (`gs --version` I think) is older than that.",swissspidy
Slated for Next Release,39630,PDF Thumbnails in Media Library Don't Fall Back to Full Size,antpb,Media,4.7,normal,normal,6.6,defect (bug),assigned,has-patch,2017-01-18T17:49:37Z,2024-02-29T12:11:12Z,"When previewing uploaded files in the Media Library, image thumbnails fall back to displaying the full size image when the option `medium_size_h` is set to `0` (the `0` setting is used to stop WordPress generating thumbs at that size).
The same functionality does not work for uploaded PDFs, instead displaying `wp-includes/images/media/document.png` in their place. The full-size thumbnail is generated, but not used.
The '''Attachment Details''' modal window successfully falls back to the full size image when previewing a PDF under the same circumstances.",daleharrison
Slated for Next Release,48710,PDF uploads are treated like images: empty alt attribute and PHP notices,joedolson*,Media,,normal,normal,6.6,defect (bug),accepted,dev-feedback,2019-11-18T20:42:21Z,2024-03-27T15:26:07Z,"uploading a .pdf image in posts reads the following;
""this image has an empty alt attribute: its file name is.... .pdf""
I am a regular user since 1.5 versions of WP and this is my first bug, or error report. I tried downgrading, but it kept coming back error.",worddean
Slated for Next Release,60141,Proximity of controls: Upload New Media multi-file uploader,rcreators,Media,5.8,normal,normal,6.6,defect (bug),assigned,,2023-12-22T13:50:57Z,2024-03-19T15:14:07Z,"See #40822
See #51754
When uploading media files in the Upload New Media > multi-file uploader page, newly added files are listed within rows after the uploader.
The rows contain:
- The attachment details, on the left.
- Additional tools, on the right.
There's a couple problems with that.
== Proximity of controls
The tools are displayed too far to the right, way far from the details. This is a problem, for example, for low vision users and users who use screen magnifiers, as the tools may be out of their vision field.
Controls should be displayed visually grouped so that they can be easily discovered by all users. I'm not sure there's a good reason to have all that spacing between details and tools in the first place.
== The Copy button shifts to the left when copying
There's a few Copy buttons in use in the admin pages. Most of them are aligned to the left and there's a good reason for that: The UI must provide space for the 'Copied!' confirmation text.
However, on this page the Copy button is aligned to the right. After a copy operation, the 'Copied!' text appears on the right of the button thus making the button itself shift to the left. I'm not sure having moving interactive controls on the screen is a good user experience. Instead, the Copy button should be placed in a way to reserve some space for the 'Copied!' text to appear without triggering a shift of other content.
See screenshots and animated GIF below.",afercia
Slated for Next Release,27919,Similar strings for media modal,joedolson*,Media,3.9,normal,normal,6.6,defect (bug),accepted,has-patch,2014-04-19T18:10:24Z,2024-02-29T12:09:45Z,"There are some strings which we use for the same action from different modal windows:
- ""Attachment Display Settings"" x ""Display Settings"" - same settings from different windows
- ""Edit Image"" x ""Edit Original"" - same link from different windows
- ""There are no associated subtitles."" - should be ""items"", I guess (can be inserted also other things then subtitles).",pavelevap
Slated for Next Release,60291,Support Lossless WebP in WP_Image_Editor_GD,,Media,5.8,normal,normal,6.6,defect (bug),new,needs-unit-tests,2024-01-19T01:08:14Z,2024-02-19T17:09:20Z,"While WordPress has supported WebP lossless since WebP support was introduced in WP 5.8 (https://make.wordpress.org/core/2021/06/07/wordpress-5-8-adds-webp-support/) - outputting lossless sub-size image when you upload a lossless WebP - this only worked correctly when Imagick was installed as at the time lossless was not supported in PHP's bundled GD.
PHP's bundled GD supports lossless output for WebP images since PHP 8.1, see see php.watch/versions/8.1/gd-webp-lossless.
The capability to handle lossless WebPs can be detected in GD by the presence of the `IMG_WEBP_LOSSLESS` constant.
To fix this - similar to Imagick, GD should output WebP lossless images when lossless WebP images are uploaded.
",adamsilverstein
Slated for Next Release,60158,The description field for media doesn't automatically make paragraphs in the generated code,joedolson*,Media,,normal,normal,6.6,defect (bug),accepted,needs-unit-tests,2023-12-27T11:47:53Z,2024-03-19T15:20:16Z,"There are two ways to edit a media:
- via a modal window where all the contribution fields are only simple textareas;
- via a dedicated web page where ""alternative text"" and ""caption"" fields are simple textareas and the ""description"" field is a WYSIWYG editor in text mode where TinyMCE is deactivated.
For some media, you can need to add a long description just like a transcript (for videos, audios, complex images like infographic, etc.).
So, in these cases, the description field can be used because it's totally appropriate.
But, there is a problem: usually, in editor fields, the paragraphs (
elements) are automatically added when you display the web page (in the front view). In this field, they are not.
For accessibility reason, paragraphs need to be HTML paragraphs ([https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html WCAG Success Criterion 1.3.1: Info and Relationships (level A)]).
I've tried to modify the code in the core to add TinyMCE that is explicitly deactivated and this is fixing the problem.
It's in wp-admin/includes/media.php, on line 3261 where you can just change ""false"" to ""true"" for ""tinymce"":
{{{#!php
'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
$editor_args = array(
'textarea_name' => 'content',
'textarea_rows' => 5,
'media_buttons' => false,
'tinymce' => false,
'quicktags' => $quicktags_settings,
);
}}}
So, is it possible to activate TinyMCE for this field? Why is it deactivated?
Or, if it's not possible, is it possible to make this option hookable?
Thank you
",juliemoynat
Slated for Next Release,60666,Unwanted section appears as a sidebar in 'Create gallery' section,joedolson*,Media,5.0,normal,normal,6.6,defect (bug),accepted,,2024-03-01T09:04:35Z,2024-03-06T16:46:30Z,"Unwanted section with 'Actions' and 'Create gallery' texts appear in the sidebar of Media Library and nothing happens on selection or click of the texts.
To find the issue, please go through the below steps.
1.From the 'File' block add the block 'Gallery', then select Media Library.
2.Unwanted sidebar section with the specified texts appears.",ukdrahul
Slated for Next Release,32282,WordPress image cropping is buggy,joedolson*,Media,4.2.2,normal,normal,6.6,defect (bug),accepted,has-patch,2015-05-07T11:10:30Z,2024-02-26T16:51:19Z,"see here
http://wordpress.stackexchange.com/questions/187577/cropping-image-results-in-image-being-too-small?noredirect=1#comment273421_187577
text copied from there:
This is the wordpress version 4.2.2 powell
I crop 1500 x 1000 and then press on crop, then save.
Resulting image size:
1497 x 1000
I don't know, I somehow hoped that wordpress is able to crop correctly.
The original image can be found here:
http://img.youtube.com/vi/zXgyoDAuaH0/maxresdefault.jpg
What I did is downsize to .... x 1000 then try to crop with selection manually entering 1500 x 1000
You can actually see the bug earlier, when you enter 1500 x 1000 and then click on the selection to drag it around (right, drag the selection, not change size) it results in the number 1500 falling down to 1498.",Jossnaz
Slated for Next Release,59641,manually setting fetchpriority on image should prevent core from adding fetchpriority attribute,,Media,6.3,normal,normal,6.6,defect (bug),new,,2023-10-16T20:44:56Z,2024-02-17T13:44:33Z,"When working on testing the automated fetchpriorty attribute core now adds for images, I discovered this bug:
If users manually set fetchpriority=""high"" on an image either programmatically or using a plugin, core will not change that setting, however it unexpectedly sets fetchpriority=""high"" on another image.
=== Steps to reproduce
1. install this plugin to add a manual fetchpriority dropdown: https://github.com/adamsilverstein/wp-fetchpriority-control
2. create a post with several large images
3. select the first image and apply fetchpriority=""high"" (under advanced)
3. publish the post and view its source
**Expected results:**
Only the first image should have the `fetchpriority=""high""` attribute, setting high fetchpriority on more than one image reduces the effect of adding the attribute.
**Actual result:**
Core applies `fetchpriority=""high""` to the second image so the first two images contain the attribute.
",adamsilverstein
Tickets Awaiting Review,60082,"""Copied"" tooltip should be hidden when another attachment URL is copied (in list mode)",,Media,6.0,normal,normal,Awaiting Review,defect (bug),new,,2023-12-15T13:05:00Z,2024-03-12T15:39:27Z,"In the media list view, clicking the ""Copy URL"" action link displays previously clicked ""Copy URL"". The previously clicked row showing ""Copied!"" when hover the media again.
=== Environment
- WordPress: 6.4.2
- PHP: 8.2.0
- Server: Apache/2.4.54 (Unix) OpenSSL/1.0.2u PHP/8.2.0 mod_wsgi/3.5 Python/2.7.18 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
- Database: mysqli (Server: 5.7.39 / Client: 8.2.0)
- Browser: Firefox 119.0 (macOS)
- Theme: Twenty Twenty-Four 1.0
- MU-Plugins: None activated
- Plugins:
* WordPress Beta Tester 3.5.5
=== Steps to Reproduce
1. Go to media library
2. Click ""Copy URL"" of one of the media.
3. Click ""Copy URL"" of another media.
4. The previously clicked row showing ""Copied!"" when hover the media again.
=== Expected Results
1. The previously ""Copied!"" tooltip should be close after clicking the next one.
=== Actual Results
1. The previously clicked row showing ""Copied!"" when hover the media again.",jayadevankbh
Tickets Awaiting Review,58287,"""The server cannot process the image"" error, set_imagick_time_limit() and WP 6.2",,Media,6.2,normal,major,Awaiting Review,defect (bug),new,,2023-05-10T15:51:53Z,2023-05-10T19:54:45Z,"On many of our sites, managed on different machines and with different configurations, with version 6.2 of WordPress, when uploading images we often get this error:
""The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels.""
Nothing appears in the `debug.log`, but analyzing the issue -which had never occurred before WordPress 6.2- we realized that it seems to be due to the new `set_imagick_time_limit()` method of the `WP_Image_Editor_Imagick` class.
Maybe the value `0.8 * $php_timeout` is that a bit too conservative? Maybe it could be made hookable?",delitestudio
Tickets Awaiting Review,43531,$content_width and Add Media (+ twentyseverteen?),,Media,4.9.4,normal,normal,Awaiting Review,defect (bug),new,,2018-03-12T20:07:38Z,2019-01-21T22:04:59Z,"I apologize in advance if this isn't a bug. However, I couldn't seem to find any documentation on the expected behavior (e.g., there's nothing on the codex page for the image_size_names_choose filter). None the less, it certainly feels odd / awkward.
When adding an image (to a post / page), the size setting select (Add Media > Attachment Display Setting > Size) doesn't feel quite right. I understand the relationship between (global) $content_width and this setting. That is, the tag's width= is forced / maxed to the $content_width (if the image is wider than the $content_width).
I see this happening for the size = large images, as well as any image sizes I've added via add_image_size() that are too wide. However, it (i.e., the forced max width=) doesn't happen to the size Medium when the Medium width is set wider than the content width.
Perhaps this is intentional?
Theme was twentyseventeen. Unfortunately, I've haven't had time to try to reproduce this on another theme. The size Medium was set to 800 x 800.
I'd like to suggest the Settings > Media page display the current $content_width, as well as explain a bit, as well as link to a deeper explanation. As it is, a user can select a theme, blindly set the image sizes (not realizing who they actually map to the theme), and then be hit with the experience (?) described above, AND have no idea why.
Truth be told, it took me too long to figure this out. Somehow I've managed to avoid $content_width. Too many custom themes maybe? :)
Or am I just missing something about the intent of what otherwise feels like a sloppy experience?
I hope this helps. TIA
",ChiefAlchemist
Tickets Awaiting Review,59684,'filesize' metadata not updated after resizing media,,Media,6.3.3,normal,minor,Awaiting Review,defect (bug),new,,2023-10-19T16:28:17Z,2023-10-31T17:01:30Z,"It seems like WordPress does not update the 'filesize' metadata after an image is modified through the media library. The details panel in the media library displays the original file size instead of the 'new' file size.
=== Environment
- WordPress: 6.3.3-alpha-56924
- PHP: 8.2.10
- Server: Apache
- Database: mysqli (Server: 5.7.31 / Client: mysqlnd 8.2.10)
- Browser: Chrome 118.0.0.0 (Windows 10/11)
- MU-Plugins: None activated
- Plugins:
- WordPress Beta Tester 3.5.4
The following optional modules are not currently installed on our server:
- exif
- fileinfo
- imagick
=== Steps to Reproduce
1. Upload a new image in the media library
2. Note the file size (ie. 22 KB)
3. Resize the image by clicking on 'Edit Image', then 'Scale Image' (in my test case, I resized the image from 1920x1080 to 200x113)
4. Click 'Update'
5. The 'Dimensions' field is correctly updated, but 'File size' remains the same (22 KB)
=== Expected Results
The 'File size' should display the new file size (ie. 3.3 KB)
=== Actual Results
The 'File size' field displays the size of the original image, before it was resized.
Here is the value of the '_wp_attachment_metadata' field in the database after the media is resized:
{{{
a:6:{s:5:""width"";i:200;s:6:""height"";i:113;s:4:""file"";s:31:""2023/10/Test-e1697729884174.png"";s:8:""filesize"";i:22990;s:5:""sizes"";a:5:{s:6:""medium"";a:5:{s:4:""file"";s:16:""Test-300x169.png"";s:5:""width"";i:300;s:6:""height"";i:169;s:9:""mime-type"";s:9:""image/png"";s:8:""filesize"";i:4852;}s:5:""large"";a:5:{s:4:""file"";s:17:""Test-1024x576.png"";s:5:""width"";i:1024;s:6:""height"";i:576;s:9:""mime-type"";s:9:""image/png"";s:8:""filesize"";i:18748;}s:9:""thumbnail"";a:5:{s:4:""file"";s:16:""Test-150x150.png"";s:5:""width"";i:150;s:6:""height"";i:150;s:9:""mime-type"";s:9:""image/png"";s:8:""filesize"";i:3006;}s:12:""medium_large"";a:5:{s:4:""file"";s:16:""Test-768x432.png"";s:5:""width"";i:768;s:6:""height"";i:432;s:9:""mime-type"";s:9:""image/png"";s:8:""filesize"";i:13044;}s:9:""1536x1536"";a:5:{s:4:""file"";s:17:""Test-1536x864.png"";s:5:""width"";i:1536;s:6:""height"";i:864;s:9:""mime-type"";s:9:""image/png"";s:8:""filesize"";i:30857;}}s:10:""image_meta"";a:12:{s:8:""aperture"";s:1:""0"";s:6:""credit"";s:0:"""";s:6:""camera"";s:0:"""";s:7:""caption"";s:0:"""";s:17:""created_timestamp"";s:1:""0"";s:9:""copyright"";s:0:"""";s:12:""focal_length"";s:1:""0"";s:3:""iso"";s:1:""0"";s:13:""shutter_speed"";s:1:""0"";s:5:""title"";s:0:"""";s:11:""orientation"";s:1:""0"";s:8:""keywords"";a:0:{}}}
}}}
The ""filesize"" metadata has the value '22990' instead of '3033'.",vertisoft
Tickets Awaiting Review,54433,ALLOW_UNFILTERED_UPLOADS does not work anymore,,Media,5.8.2,normal,normal,Awaiting Review,defect (bug),assigned,,2021-11-13T01:02:25Z,2022-11-30T20:15:35Z,"I previously added
define( 'ALLOW_UNFILTERED_UPLOADS', true );
to wp-config.php so that I could upload binary executable into the media library. These executable files are installers for the software my lab develops and which is used by thousands of users around the world.
As I am trying to release a new version I tried to upload the new installers and no matter what I do I get ""Sorry, this file type is not permitted for security reasons"".
I really see no reason why the site admin should be prevented to upload something into his own site.
I am using version 5.8.2 of wordpress which does not appear in the Version pull down below, and Avada and a multisite installation.
",mssd19
Tickets Awaiting Review,60074,Add New Media File > The ''dismiss button ''not showing any response when uploading the unsupported (.jfif) file,adamsilverstein,Media,6.4.2,normal,normal,Awaiting Review,defect (bug),assigned,has-patch,2023-12-14T17:43:27Z,2023-12-15T18:51:25Z,"Description
The ''dismiss button'' is not working when uploading the not allowed file type ( .jfif file)
Environment
- WordPress: 6.4.2
- PHP: 8.2.4
- Server: Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4
- Database: mysqli (Server: 10.4.28-MariaDB / Client: mysqlnd 8.2.4)
- Browser: Chrome 119.0.0.0 (Windows 10/11)
- Theme: Twenty Twenty-Four 1.0
- Plugins:
* WordPress Beta Tester 3.5.4
Steps to Reproduce
1. Select the ''Add New Media File'' option from the Media menu
2. Upload the .jfif file
3. click the ''Dismiss'' option
4. No response showing when clicked
Expected Results
The dismiss pop-up should be disable when clicking on the ''Dismiss button''
Actual Results
No response was showing when clicked on the ''Dismiss button''
Video attached :
https://www.loom.com/share/9130cd6cc58b48a8aae66849dc11670f",vivekawsm
Tickets Awaiting Review,35887,Adding multiple media to post - selecting image size,,Media,4.4.2,normal,normal,Awaiting Review,defect (bug),new,,2016-02-20T12:03:10Z,2023-10-25T04:35:24Z,"When clicking ""Add Media"" to add images to a post, you can select multiple images. With all images selected, logic follows that if you change the ""ATTACHMENT DISPLAY SETTINGS"" size from default ""Medium"" to ""Full Size"", that all selected images would have the same setting changed, but when you add them, only the one image that was highlighted is actually ""Full Size"" and the rest which were selected, but not highlighted, are still ""Medium"".
I think when adding multiple media, all should be changed to size that is selected in ""ATTACHMENT DISPLAY SETTINGS"".",myburgh.bernard@…
Tickets Awaiting Review,48026,Always show selected image even if it doesn't match search string,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2019-09-12T06:35:43Z,2019-11-04T01:25:45Z,"When embedding an image in a post, if there is a pattern in the search box and an image is uploaded that doesn't match it, the new image details are not shown until the search pattern is cleared.
Steps:
1. Click ""Add Media""
2. Enter search pattern, e.g. ""abc""
3. Switch to ""Upload Files"" tab and upload a file, e.g. ""xyz""
4. Once the file is uploaded, you see the ""Media Library"" tab again, but no details are showing in the ""Attachment Details"" area, although the newly-uploaded file is selected
5. Clear the search pattern
6. Selected image details appear
The correct behavior is to always show the details of the selected file, even if it doesn't match the search pattern, at least immediately after it's been uploaded.",galbaras
Tickets Awaiting Review,41353,Async upload breaks when there are special characters into file name,,Media,4.8,normal,normal,Awaiting Review,defect (bug),new,dev-feedback,2017-07-18T07:53:48Z,2017-07-19T14:48:50Z,"After crunching the image, thumbnail breaks for the image.",bhargavbhandari90
Tickets Awaiting Review,43736,Audio continues to play in Media Modal after close,,Media,4.9.5,normal,normal,Awaiting Review,defect (bug),new,,2018-04-11T03:21:00Z,2021-04-01T15:24:25Z,"When previewing an audio file in the Media Library modal, if you click Close or Escape, the audio continues to play.
I haven't tested with Video, but I am assuming audio continues as well.",bahia0019
Tickets Awaiting Review,36680,"Audio player with preload=""metadata"" shows incorrect duration for audio files 1 hour or longer",,Media,4.5.1,normal,normal,Awaiting Review,defect (bug),new,,2016-04-27T04:29:12Z,2017-09-20T21:29:57Z,"For an audio file that's longer than one hour, using the audio player shortcode with preload=""metadata"" shows an incorrect duration for the audio when the page loads. The hours are chopped off. So an audio that is 1:07:45 in duration will erroneously display 07:45 upon loading.
Then when the audio file is played, the correct duration pops in, but this causes the volume control to disappear, so the volume can no longer be adjusted while the clip is playing.
Many podcasts are longer than an hour in duration.
For a demonstration of the bug, see audio 16 on this page, which is 1:07:45 in duration:
http://www.stevepavlina.com/audio/",Dexterity
Tickets Awaiting Review,34296,Autoplay for more than one self-hosted video fails,,Media,4.3.1,normal,normal,Awaiting Review,defect (bug),reopened,,2015-10-14T10:05:48Z,2017-07-05T20:12:26Z,"Hi,
When adding more than one self-hosted video to a page (using the [video] shortcode or media browser to insert), if you set more than one to autoplay, then none of them autoplay.
This might be a mediaelementjs problem.
Stock 4.3.1 install with TwentyFifteen:
http://test.10degrees.uk/one-video-autoplay/ - one video set to autplay, works fine.
http://test.10degrees.uk/two-videos-autoplay/ - both videos set to autoplay, neither plays.
These are both mp4 files.
Jonny",jonnyvaughan
Tickets Awaiting Review,42751,Can we please enqueue media-views independently ?,,Media,4.9,normal,normal,Awaiting Review,defect (bug),new,,2017-11-29T22:14:11Z,2023-10-18T16:16:58Z,"Many of theme developers are styling mediaelement to their preference and this is a first step when they do so;
{{{
/*
* use theme mediaelement CSS
*/
wp_deregister_style('mediaelement');
wp_deregister_style('wp-mediaelement');
}}}
that disables the default CSS and lets us use our own. Issue with this is that
buttons, imgareaselect and media-views CSS files depend on these and if anyone is using a frontend page builder or anything that needs media library in frontend, these 3 CSS files are not present.
My first tought was
{{{
/*
* since we have deregistered medialement style
* make sure media dependencies are loaded
* in case of frontend editros
*/
if( is_user_logged_in() ){
wp_enqueue_style( 'buttons' );
wp_enqueue_style( 'imgareaselect' );
wp_enqueue_style( 'media-views' ) ;
}
}}}
but to my surprise media-views which is a key CSS file for media library is not loading since it is a dependent.
I know that I can do the direct enque but since we have a handle we should be able to use it independently from other styles.
While we are at it, why are we loading mediaelement CSS files at the bottom of body
http://prntscr.com/hh0808 ?
CSS files should always be in head. ",Themezly
Tickets Awaiting Review,42794,Can't upload new media files when multiple media dialogues are present on a single page,,Media,3.7.19,normal,normal,Awaiting Review,defect (bug),new,has-patch,2017-12-04T16:01:05Z,2018-01-19T09:44:09Z,"'''Layman error description''': When there are more than one Inline Media Uploader on a page in the Admin, and one tries to upload a new image or file to the Media Library, the upload gets stuck and the image is never inserted into the media library (see attached screenshot). This happens to me when using the post-types-definitely plugin to create multiple media fields in a CPT. The exact same error (including error messages) has been described before ([https://wordpress.org/support/topic/js-bug-prevents-uploading-media-in-pagepost-editor/?replies=11#post-6860868] and https://wordpress.org/support/topic/error-uploading-media-in-post-if-yoast-is-active/#post-6922117), and even though there it was related to a plugin combination, it is not in my case. The workaround proposed there is not applicable to my case and the error source I found has nothing to do with plugins.[[BR]][[BR]]
'''Technical error description''': When examined in the Firefox Developer Tools, the console shows the error `TypeError: this.$index is undefined`. In Chrome, the error is `Cannot read property 'text' of undefined`. Both of them point to `wp-includes/js/media-views.js:UploaderStatus.info()` [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/js/media-views.js?rev=40359#L8361][[BR]][[BR]]
'''Technical analysis''': Upon closer inspection of the code, the problem seems to be as follows: When we upload a file (by clicking Ok on the OS file dialogue), a callback handler calls info() on each UploadStatus object belonging to a loaded media dialogue. The method info() relies on the fact that normally, the method ready() on the same UploadStatus object is called before the call to info(). ready() uses JQuery to set (amongst others) the member variable $index inside the UploadStatus object. info() then tries to access this.$index on all UploadStatus objects and set their contents using the JQuery text() function. However, since ready() is not called before a media dialogue is opened for the first time, and our opened dialogue calls info() on all media dialogues, the access to this.$index fails in the unopened UploadStatus objects, throwing the above Javascript Error and making the script abort, therefore freezing the upload progress bar.[[BR]][[BR]]
'''Workarounds''': This analysis is confirmed by the fact that when I open all media dialogues on the page at least once before uploading an image in any of them, uploading works as expected (because all of the UploadStatuses are ready() and have their $index member variable defined). A workaround for the problem is to just use the inline media dialogues for selecting existing media from the media library, and using the Media->New menu to actually upload any files. The error happened in all Wordpress versions I tested (since 4.8.3).[[BR]][[BR]]
'''Proposed solution''': I can see a number of different solutions for this problem. The best one would be to only call info() on the UploadStatus belonging to the opened media dialogue. However, the info() calls are performed via a single event trigger ([https://core.trac.wordpress.org/browser/trunk/src/wp-includes/js/media-views.js?rev=40359#L8289]) that all info() methods subscribe to in the UploadStatus.initialize() function (relevant for this bug is the `""add""` trigger), and this trigger cannot distinguish its subscribers. Therefore I propose to instead call ready() at the end of the initialize() function. This way, ready() is only called once more than before per media dialogue and page load, and we can be certain that info() is only called on UploadStatuses that are ready().",carlobeltrame
Tickets Awaiting Review,55200,Cannot add caption to images on mobile,,Media,5.9,normal,normal,Awaiting Review,defect (bug),new,,2022-02-19T01:05:50Z,2023-06-14T11:45:43Z,"On the mobile view of the admin section you cannot add ally text, captions, or descriptions to media uploads ",vincepettit
Tickets Awaiting Review,53800,Color of WebP image thumbnail changes on media library list and grid view,,Media,5.8,normal,normal,Awaiting Review,defect (bug),new,,2021-07-27T15:40:23Z,2022-11-04T12:20:55Z,"Hello friends,
Probably this issue is already being tracked. If so please close the ticket.
WordPress 5.8 supports WebP image upload, which works well. But in media library the original color of the image changes completely to a yellow hue. Please see attached screenshots.
**Development Environment**
OS: Ubuntu 16.04
WordPress version: 5.8
Installed and Active Plugins: Akismet Anti Spam
Installed and Active Themes: 2021",subrataemfluence
Tickets Awaiting Review,59339,Conversion to webp causes fatal error when original image is a palette image (as opposed to truecolor),,Media,6.3.1,normal,normal,Awaiting Review,defect (bug),new,,2023-09-13T13:41:52Z,2023-09-13T13:41:52Z,"I am working on an image conversion plugin. I've run into a bug when the original image is a ""paletter image""[https://www.thecoderscamp.com/paletter-image-not-supported-by-webp/]"", or in other words, an image that has an indexed palette rather than being truecolor. I believe it's a png.
The error I get is:
{{{
Fatal error: Paletter image not supported by webp in /home/username/public_html/wp-includes/class-wp-image-editor.php on line 584
}}}
And how I'm using it:
{{{#!php
image_path );
$new_file_info = $this->get_editor()->save( $this->image_path, 'image/webp' );
}}}
This method worked fine on hundreds of images of png, jpg, and tiff until I ran into this one that has a ""palette"".
In `wp-includes/class-wp-image-editor-gd.php:487`, if the image loaded into WP_Image_Editor is a png, we check for a palette and convert to true color before saving. I believe that we need to also check in the webp conditional and, just like for png, convert to truecolor first.
",jakeparis
Tickets Awaiting Review,43009,Create Video/Audio Playlist hooks not working as expected,,Media,4.9.1,normal,normal,Awaiting Review,defect (bug),new,has-patch,2018-01-02T15:54:41Z,2022-03-25T17:43:10Z,"WordPress now provides the following hooks:
https://developer.wordpress.org/reference/hooks/media_library_show_video_playlist/
https://developer.wordpress.org/reference/hooks/media_library_show_audio_playlist/
We can use these to hide the “Create Video Playlist” (and Audio) button in the media library.
These only seem to work on initial page load. The “Create Video Playlist” button still appears for me even though I'm using these filters.
To reproduce from a fresh install.
1. Set these lines in your theme functions.php
{{{#!php
add_filter( 'media_library_show_audio_playlist', function() { return false; });
add_filter( 'media_library_show_video_playlist', function() { return false; });
}}}
2. Go to wp-admin/post-new.php.
3. Click 'Add Media', notice that the playlist buttons are missing.
4. Upload a video file (I used .mov). Notice that the 'Create Video Playlist' button now appears.
This likely exists in versions earlier than 4.9.1, but this was the version I tested in.",iforrest
Tickets Awaiting Review,42953,Created images have a larger filesize than the original,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-12-21T12:34:42Z,2020-11-30T03:14:16Z,"Images uploaded in the media library get resized to the defined sizes. However, if the image has been optimized beforehand the result can be that the generated images have a filesize larger than the originally uploaded image.
It can happen due to a very high `jpeg_quality` value for example..
This should not happen under any circumstances. Uploading optimized images is something a lot of people do for SEO purposes, and larger generated images affect that negatively.
Sometimes even if the image-size is smaller, the generated file's filesize is bigger.
One solution would be to save the image in a temp location and have its filesize checked against the original image. If the image is smaller than the original one then move to its final location. If not, then some other solution has to be found.",aristath
Tickets Awaiting Review,36418,Custom MIME type icons lost in WP Media List view,,Media,,normal,normal,Awaiting Review,defect (bug),new,dev-feedback,2016-04-05T01:18:11Z,2021-10-23T13:22:48Z,"The ability to define custom MIME icons has been possible since at least v2.5, by hooking into several filters, one of which is `icons_dir`.
`icons_dir` allows you to specify additional directory/uri pairs for the `wp_mime_type_icon` routine to search, ideally adding icon support for additional MIME types.
However, going through SVN history, it seems that almost from the beginning of the availability of that hook, there has been a loophole where the additional icon directories are ignored!
Specifically:
`wp_get_attachment_image_src` calls `wp_mime_type_icon`, which in theory could select a custom icon directory added by the `icon_dirs` hook. It then attempts to fetch width and height information from the selected icon file, but only checks the default wp-includes/images/media directory. Of course, this prevents the custom icons from displaying when fetched through `wp_get_attachment_image_src`.",jhorowitz
Tickets Awaiting Review,53895,"Default Audio Player Bug, mejs-container wp-audio-shortcode mejs-audio",,Media,,normal,normal,Awaiting Review,defect (bug),new,,2021-08-08T22:33:28Z,2021-08-08T22:38:59Z,"The default code has a problem in this zone mejs-container wp-audio-shortcode mejs-audio. The width is set and this causes viewing problems after changing browser window size. The width is hard coded and should not be set. To reproduce the bug add a audio file with wp customizer, in a theme with a header, save. View code and the width is set. This would be fine if the width is a percentage or not set at all. I personally think the width should be removed.",akissz
Tickets Awaiting Review,51038,Default height when using add_theme_support( 'custom-header') in GD.,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-08-17T06:17:21Z,2021-06-01T03:21:54Z,"`add_theme_support( 'custom-header')` defaults to 0 for width and height.
if you are using GD, the height will be set to 0 and the cropping will fail and you will get the error message “There has been an error cropping your image.“.
If the height is set to 0 in GD, how about getting and using the height of the source file?",munyagu
Tickets Awaiting Review,49161,Disabling big_image_size_threshold via filters does NOT work,,Media,,normal,major,Awaiting Review,defect (bug),new,,2020-01-09T18:50:29Z,2021-11-06T02:27:00Z,"Trying to disable the new image sizes in WordPress but this has no effect! I'm still seeing the new large sizes being saved on my server even after using this code.
{{{
add_filter( 'big_image_size_threshold', '__return_false' );
}}}
This is a very serious issue for me. My site accepts user uploads but I've been overwriting the full size images with the thumbnail not just to save space on server but also so that I don't have large images stored on my server in case of possible copyright abuse.
This should have been a feature you need to turn on, not something that automatically happened after a site is auto upgraded. I absolutely need this disabled but the ability to disable this is NOT working.
",bbtodd
Tickets Awaiting Review,50011,Edge case in image lazy-loading,,Media,5.5,normal,normal,Awaiting Review,defect (bug),new,,2020-04-25T20:40:32Z,2020-05-20T21:42:52Z,"In #44427 the feature to lazy load images by default was added.
The code uses regex and hence there are some edge cases which can complicate.
One such case is adding
{{{
loading=lazy
}}}
with space before 'loading' in the alt value.
This can be done in the block-editor by selecting the image and adding the above in:
Image settings > Alt text (alternative text) box
This is allowed in HTML.
When this is done, the regex thinks that the image tag has a lazy loading attribute and doesn't add it. ",superpoincare
Tickets Awaiting Review,58794,Edit Image UX needs improvement,,Media,6.3,normal,major,Awaiting Review,defect (bug),new,,2023-07-12T12:25:30Z,2023-07-15T20:38:10Z,"== Bug Report
=== Description
When **editing**(scale and crop) an image via ""**Attachment details**"". The **settings** for the selected feature are shown at the **end of the popup**. This would be fine in the case of smaller images. But for **larger images**, especially ones in the **portrait orientation**, these settings are not visible on the screen unless one scrolls down. There seems to be room for UX improvement here.
I think we can keep the settings on the **right-hand side** of the popup, which would remove the need to scroll down to use them, no matter what the image size is.
Also, I felt this must have been done as such since not all features need a settings section. But can't that be handled by maybe toggling the section altogether? ( if placed on the right that is )
Attaching videos for reference. The video names describe the test cases.
=== Environment
- WordPress: 6.3-beta4
- PHP: 7.4.12
- Server: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
- Database: mysqli (Server: 5.7.32 / Client: mysqlnd 7.4.12)
- Browser: Chrome 114.0.0.0 (macOS)
- Theme: Twenty Twenty-Three 1.1
- MU-Plugins: None activated
- Plugins:
* WordPress Beta Tester 3.5.1
=== Steps to Reproduce
1. Navigate to Media Library
2. Select a large Image to edit(preferably Portrait orientation)
3. Edit Image
4. Click on the ""Scale"" button
5. Nothing happens
6. Settings are shown at the end of the popup which can only be seen if scrolled.
=== Expected Results
1. On clicking the ""Scale"" button, the settings to edit the scale should be visible to the user.
=== Actual Results
1. Right now ""Scale & Crop"" settings are only visible if scrolled down(for bigger images).",deepakvijayan
Tickets Awaiting Review,43560,Entering single quotes in Add Media dialog after recropping causes browser to hang,,Media,4.9.4,normal,normal,Awaiting Review,defect (bug),new,has-patch,2018-03-15T14:46:23Z,2020-02-19T16:46:40Z,"'''To reproduce'''
* Create a draft and insert an image into the content.
* In the Visual editor, click on the image to get the tooltip image edit menu, then on the pencil icon to edit the image.
* In the Image Details dialog click the ""Edit Original"" button to edit the image.
* In the Edit Image dialog, click and drag on the image to create a cropping zone.
* Click the crop icon in top left above the image to crop it.
* Click the ""Save"" button below the image to save the crop.
* Back on the Image Details dialog, try to enter several single quotes in the Alternative Text input. Tap your single quote key six or seven times.
'''What I expect to see'''
* I am able to continue entering text in the image dialog inputs, even if I'm prevented from entering a single quote.
'''What I see instead'''
* I am unable to enter any text in any of the dialog's inputs.
* In most cases the page seems to lock for some time - I'm unable to interact with it at all: I can't refresh or close it normally. The Chrome task manager shows 101% CPU usage for the tab.
* There are no JS errors in the console, and no requests in the network tab.
* On some occasions, after leaving the page for several minutes, it eventually unlocks by itself, and some of the characters I typed in my earlier attempt to enter text are output wherever I happen to have my cursor.
'''Notes'''
It looks like some piece of JS is somehow capturing the keypresses in the Alternative Text input.
This was reproduced in macOS and Windows Chrome 64 and macOS Chromium 62 (the Chromium with no browser extensions) on a fresh checkout of WordPress v4.9.4. It doesn't happen in FF55.",andfinally
Tickets Awaiting Review,52509,Error generating Thumbnails of PDF-Files,,Media,5.6.1,normal,normal,Awaiting Review,defect (bug),new,,2021-02-12T12:46:26Z,2023-07-02T13:37:05Z,"This is a follow-up to #48853.
This issue seems to be still present in Version 5.6.1
Some PDF-Files cause an internal server error, some do not. (The server's error log tells something about missing headers)
Here's what i did to isolate the error:
- I examined the PDF-Files. The affected files had a PDF-Version 1.7 an were created with non-Adobe-Tools (e.g. Office365). PDFs with Version 1.4 and 1.5 (created with Acrobat) worked well.
- tried it with a local copy of the site on XAMPP: No Problems
- used a little code-snippet to prevent thumbnail-generation in general: Upload works
This is the snippet:
{{{#!php
Set featured image in the sidebar
- the ""Featured Image"" media modal opens
- depending if your initial device orientation is landscape or portrait, click once or twice on the Chrome dev tool ""Rotate"" button to change device orientation
- once the orientation is ""portrait"", the whole content of the modal disappears
- ie: the content container becomes totally empty: `
`
- change orientation again: still empty
See attached screenshots.",afercia
Tickets Awaiting Review,28053,Fields with same name added to new media modal using 'attachment_fields_to_edit' do not pass as an array when saving.,joedolson*,Media,3.5,normal,normal,Awaiting Review,defect (bug),accepted,has-patch,2014-04-28T11:44:53Z,2021-03-03T17:55:07Z,"If you use the 'attachment_fields_to_edit' to add a set of checkboxes to the media modal attachment details (to implement a better UI for taxonomies for example) the save method of media.view.AttachmentCompat doesn't cater for fields with the same name to be passed as an array, it just passes the last field of that name that is found.
When getting the fields to save, if multiple fields with the same name are found they should be passed as an array.
I have attached a visual of the custom UI with checkboxes and a patch for testing.",husobj
Tickets Awaiting Review,55465,Fix hiding playlist buttons from Add Media modal dialog,,Media,5.9.2,normal,minor,Awaiting Review,defect (bug),new,has-patch,2022-03-25T17:31:46Z,2022-03-25T18:59:18Z,"==== How to reproduce
On a fresh installation of WordPress 5.9.2 with [[https://wordpress.org/plugins/classic-editor/|Classic Editor]] plugin enabled, add the following lines to the default theme's `functions.php`:
{{{#!php
Nestled among ski slopes in the Garhwal Himalayas, this secluded hotel is 23 km from Panch Prayag temple and 25 km from Nanda Devi National Park. In winter, the property is only accessible by cable car.
Ranging from studios to 2-bedroom suites, the cosy lodgings come with cable TV and kitchenettes with minifridges, microwaves and stoves. Suites add living rooms and dining areas.
Breakfast is free. There's also a relaxed restaurant, a game room and a bonfire area with regular entertainment. Ski equipment rentals and lessons are available, as are guided hikes and in-room massages. The property has a generator.
The result is that the video area shows just the controls and nothing more (see attached screenshot on the left) .
I can fix this with workarounds via CSS like styling mejs-container and mejs-mediaelement (see attached screenshot on the rigth) but that's a hassle for the responsive versions.
Anyone elese facing these problems?
(P.S.: I'm not an expert AND a German, so forgive me for dumb questions and bad writing …)
",vhcrossmedia
Tickets Awaiting Review,41468,"Provide contextual info about what ""attached"" and ""detached"" means regarding media objects",,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-07-27T22:10:56Z,2017-07-30T14:25:03Z,"From user testing:
""I have no idea what it means when it says an image is 'Attached' to a post. Does it mean the image is in the post? Does it mean if I 'Detach' the image from the post it will go away from the post? I'm worried a client might 'Detach' an image from a post to remove it, or 'Attach' an image to add it. What is this for? How can an image be 'Unattached' to the post it is displayed in anyway?""",mor10
Tickets Awaiting Review,51584,Publishing a large image post while the image is still uploading allows you to leave and return to a broken image,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-10-21T05:24:32Z,2020-11-10T18:49:23Z,"This issue was originally reported by @antpb in #core-media here;
https://wordpress.slack.com/archives/C02SX62S6/p1603135350316800
If you go to the post editor and upload a large image to the image block, then publish/save and leave the screen before it's uploaded you'll return to the post with a broken image.
I'm thinking we should provide a dirty flag while that upload/resize process is underway for large images to flag to users and stop them from leaving the editor before the process completes.",garrett-eclipse
Tickets Awaiting Review,39679,Redirect loop on attachment pages,,Media,4.7.1,normal,normal,Awaiting Review,defect (bug),new,,2017-01-24T17:12:11Z,2018-09-03T15:48:54Z,"Summary: a URL to an attachment page will redirect to itself in an infinite loop in certain cases.
Speculation: this may be due to my permalink structure, which would be why others are not complaining about it.
This issue depends on the letter case of the URL. The attachment pages exist, and there is a method that allows them to be accessed, however they cannot be reached if the link is all lowercase letters. Because that is the link generated by the Media Library, users can encounter this.
It took me a while to convince myself that this is a WP core issue because it does not happen on all servers. After adding logging code to some of the action hooks, I could see that a URL comes in and then generates a redirect, using `wp_redirect`, to the exact same URL that was requested.
My permalink structure is `/%postname%.html`, and the WP portion of the site is in a subdirectory, so WP pages are accessed as: http://yourfriendpaul.com/wp/shredding-on-my-guitar.html
Trying to reach the attachment page using this URL will result in an infinite loop:
http://yourfriendpaul.com/wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
Trying to reach it with this one will succeed, note the uppercase C. Making ANY letter in path uppercase will make it succeed:
http://yourfriendpaul.com/wp/shredding-on-my-guitar.html/good-at-shredding-dsCn4850-1200x900
To complicate matters further, this does not happen on my Ubuntu server, but does happen on GoDaddy with the exact same database (other than site name).
This is my first bug report, so I'm not sure how much info to put in the initial report. The following is an excerpt from my error log, with some notes added. Sorry for the formatting, it is just pasted.
Thanks in advance for looking into this.
Paul
The data is captured using the error log.
The first entry is made in wp-config.
The next 3 lines are when yfp_functions is loaded.
It creates the function that prepends `**yfplog` to an error message.
The final three lines are from the action hooks indicated.
{{{
` # A call in all lowercase has multiple tries, in bursts, which loop and cause 301 redirects to the original URI,
` # but one uppercase letter avoids any redirects and finds the content. Only two of the redirects are shown.
`
` [24-Jan-2017 06:19:04 UTC] *** in wp-config.php, REQUEST_URI is /wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
` [24-Jan-2017 06:19:04 UTC] **fyplog - *** Log writing is enabled in yfp_functions, making funcion yfp_write_log()
` [24-Jan-2017 06:19:04 UTC] **fyplog - script: /wp/index.php
` [24-Jan-2017 06:19:04 UTC] **fyplog - uri: /wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_loaded() action was called.
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_redirect() action was called, location: http://YourFriendPaul.com/wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900, status: """"
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_redirect_status() action was called, location: , status: ""301""
`
` [24-Jan-2017 06:19:04 UTC] *** in wp-config.php, REQUEST_URI is /wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
` [24-Jan-2017 06:19:04 UTC] **fyplog - *** Log writing is enabled in yfp_functions, making funcion yfp_write_log()
` [24-Jan-2017 06:19:04 UTC] **fyplog - script: /wp/index.php
` [24-Jan-2017 06:19:04 UTC] **fyplog - uri: /wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_loaded() action was called.
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_redirect() action was called, location: http://YourFriendPaul.com/wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900, status: """"
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_redirect_status() action was called, location: , status: ""301""
`
` [24-Jan-2017 06:19:49 UTC] *** in wp-config.php, REQUEST_URI is /wp/shredding-on-my-guitar.html/good-at-shredding-dsCn4850-1200x900
` [24-Jan-2017 06:19:49 UTC] **fyplog - *** Log writing is enabled in yfp_functions, making funcion yfp_write_log()
` [24-Jan-2017 06:19:49 UTC] **fyplog - script: /wp/index.php
` [24-Jan-2017 06:19:49 UTC] **fyplog - uri: /wp/shredding-on-my-guitar.html/good-at-shredding-dsCn4850-1200x900
` [24-Jan-2017 06:19:49 UTC] **fyplog - wp_loaded() action was called.
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
}}}",OPunWide
Tickets Awaiting Review,55247,SVG logos generate warnings from _wp_get_image_size_from_meta(),,Media,5.9,normal,minor,Awaiting Review,defect (bug),new,,2022-02-24T12:50:48Z,2022-03-01T16:31:16Z,"If I set an SVG image as my logo in the customizer, my debug log gets filled with the following notices:
``` PHP Notice: Trying to access array offset on value of type bool in /{redacted}/wp-includes/media.php on line 1182 ```
Looking at that file, that section refers to the following function:
{{{#!php
Media > Library - edit), the selected image gets overflow in iPhone-6/7/8 portrait mode. So for that, we can apply max-width: 100%.
Thanks,
Shashank.",shashank3105
Tickets Awaiting Review,35771,Setting Size for Native Video Player Doesn't Work,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2016-02-07T21:28:00Z,2017-06-27T16:50:20Z,"Width and height rules do not affix the size of the embedded native media player.
Width is ultimately honored, but height setting is overruled and set proportionally based on video's proportions. Consequently, if width of the player is set to fill in the theme's available content space, but the embedded video is vertical (filmed vertically, whereby height of the video is greater than width), then the player will be stretched way too tall, regardless of height settings (which is ultimately ignored).
To reproduce:
Embed any locally hosted, vertical video using native video player, using the Embed Media Player option from the Insert Media attachment window. Set width to the width of your theme's content area, and height to less than width. Height will not be honored.
Desired solution:
Set player size to the width and height chosen by the user. Fit the video within the set space of the player.",Tranny
Tickets Awaiting Review,37311,Site icon thumbnails are lost if wp_generate_attachment_metadata called again later,,Media,4.5,normal,normal,Awaiting Review,defect (bug),reopened,,2016-07-07T22:36:48Z,2021-04-14T16:36:05Z,"If image sizes are regenerated with the Regenerate Thumbnails plugin, the custom Site Icon sizes (and possibly other images in the customiser?) are lost.
The question is whether this is something that needs changing in the plugin, or whether the logic for how these sizes work should change in core. (Virtually all core documentation tells people to use this plugin when changing image sizes, so it should be fixed in one of the other).
I'm of the opinion it should be changed in core, where custom sizes like the ones created by Site Icons should be somehow marked as special sizes, with wp_generate_attachment_metadata checking for any existing custom sizes and including them in the output.",smerriman
Tickets Awaiting Review,58740,Slow load in media page of WordPress admin when having huge posts table,,Media,6.2.2,normal,minor,Awaiting Review,defect (bug),new,,2023-07-06T15:53:15Z,2023-07-06T15:53:15Z,"Slow load can be traced to this function.
{{{
// get_available_post_mime_types
// wp-includes/post.php
}}}
From what I understand, this function tries to get all of the available mime type of attachment post type. When posts are over a hundred thousand, this is causing media page in admin to load in about half a minute (hosting performance relative).
I'd like to suggest a transient in this function. Will open a PR if this bug is approved.
",Twellve_Million
Tickets Awaiting Review,54555,Slow media query on big sites,,Media,5.8.2,normal,normal,Awaiting Review,defect (bug),new,,2021-12-02T07:50:02Z,2021-12-03T20:12:28Z,"On wordpress version 5.8.2 the wp_enqueue_media() slow query is still there. I found several old discussions about being fixed for many years ago but in my case is still there.
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM wp_posts
WHERE post_type = 'attachment'
ORDER BY post_date DESC
4.6238s
I have 73903 media items",lebada
Tickets Awaiting Review,54818,Some file names are no longer sanitized,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2022-01-14T11:16:03Z,2022-01-14T13:03:24Z,"When uploading a file which filename contain accents, those accents are no longer replaced by non-accent letter.
It's specific to JPEG file.
Tested with PDF and PNG: accent are well removed.
See attached screenshot with JPEG, PNG and PDF example.
I can reproduce this with WP 5.9 RC2 and WP 5.8.3.",Chaton666
Tickets Awaiting Review,40806,Subtitles show no media files in browser when there are some,,Media,,normal,normal,Awaiting Review,defect (bug),new,has-patch,2017-05-18T17:42:45Z,2021-07-09T05:02:00Z,"This may be a case of it looking for a very particular file, the trouble is that isn't clear if the case.
I discovered this whilst testing the video widget, but assume its media library. I see the following:
[[Image(https://cldup.com/jLgqBIQbvi.png, 60%)]]
Somewhat of a surprise when my media library shows...
[[Image(https://cldup.com/pCAJry0o1a.png, 60%)]]",karmatosed
Tickets Awaiting Review,41148,Test for ticket 39875 can throw PHP error,,Media,4.8,normal,normal,Awaiting Review,defect (bug),new,has-patch,2017-06-24T07:53:42Z,2017-08-28T11:29:35Z,"The test that was written for #39875 can throw a PHP error under certain circumstances: `Undefined index: sizes`.
The problem arises when then `wp_generate_attachment_metadata()` call does not return the proper array data. As the preview path generation directly access a specific array index, this throws a PHP error.",schlessera
Tickets Awaiting Review,57488,"The ""Showing X of Y media items"" area in Media Upload screen gives wrong information.",,Media,6.1.1,normal,normal,Awaiting Review,defect (bug),new,has-patch,2023-01-18T05:24:38Z,2023-01-25T03:52:45Z,"I followed the following steps and got this error:
1) Freshly created a new WordPress site.
[[Image(https://i.paste.pics/L1SUI.png)]]
2) Created a new page and opened it in the block editor
[[Image(https://i.paste.pics/L1SW2.png)]]
3) Added a new gallery block
[[Image(https://i.paste.pics/L1SY2.png)]]
4) Clicked ""Media Library""
[[Image(https://i.paste.pics/L1SYB.png)]]
5) Uploaded new images
[[Image(https://i.paste.pics/L1SYG.png)]]
6) Uploaded 20 images, but the counter showed, ""Showing 20 of 19 media items""
[[Image(https://i.paste.pics/L1SYQ.png)]]
It showed the correct number when I closed it and opened it back up. I know it's a minor issue but thought about informing the experts.
Here are my setup details:
i) OS: Ubuntu 20.04.5 LTS
ii) Using Local by Flywheel
iii) Web server: Nginx
iv) PHP Version: 8.1.9
v) MySQL: 8.0.16
vi) WordPress: 6.1.1
vii) Browser: Opera
",shamayel007
Tickets Awaiting Review,49086,"The ""site_icon"" option isn't always removed when the site icon is deleted",,Media,,normal,normal,Awaiting Review,defect (bug),new,dev-feedback,2019-12-27T17:38:05Z,2022-01-06T02:32:21Z,"If you delete the site icon image by going to Media > Library, the ""site_icon"" option isn't deleted from the database. Note the option is deleted if you go Appearance > Customize and remove the icon through the Site Identity tab.",henry.wright
Tickets Awaiting Review,53981,The 'media_buttons' hook does not work for contributors.,,Media,2.7,normal,normal,Awaiting Review,defect (bug),new,has-patch,2021-08-23T19:10:13Z,2021-08-26T14:40:16Z,"##Problem Details##
Plugins are given the `media_buttons` hook to be able to add additional buttons to the editor interface. The way this is implemented in _WP_Editors::editor(), the user role must include the `upload_files` capability. While this makes sense when it comes the default `Add Media` button, it doesn't make sense for some other buttons such as Post And Page Builder's Add Block button, or WeForms' Contact Form buttons. The plugin developers should be able to decide what capabilites the user needs to have for their custom buttons before hooking into that action.
##Suggested Resolution##
My suggestion is that the existing `media_buttons` hook remain as it is, but that we add another hook just afterwards called `after_media_buttons` . This will allow those custom buttons to be rendered whenever the developer wishes them to be.
",jamesros161
Tickets Awaiting Review,60632,"The focus outline of the ""Upload files"" button is cut off",,Media,,normal,normal,Awaiting Review,defect (bug),new,has-patch,2024-02-25T11:25:45Z,2024-02-25T13:22:36Z,"In the media library, when the ""Media Library"" tab is selected and the ""Upload files"" tab is focused, the right side of the outline is cut off.",wildworks
Tickets Awaiting Review,58733,The load more button appears even when there is only one image in the feature image selection window.,joedolson*,Media,6.3,normal,normal,Awaiting Review,defect (bug),accepted,,2023-07-06T13:22:35Z,2023-07-21T15:20:00Z,"Load more button appears in the popup window for replacing the feature image, even when there is only one image available.
Steps to reproduce the issue:
1. Go to the post editor in WordPress.
2. Locate the section where you can edit the feature image for the post.
3. Click on the ""Replace"" button to select a new image.
4. The popup window will open, showing the available images.
Despite there being only one image in the selection, the ""Load More"" button is present in the popup window.
Video Link: https://www.loom.com/share/c0e9faa4cc86455eb30bdaf2149b5a60
=== Environment
- WordPress: 6.3-beta3-56143
- PHP: 7.4.21
- Server: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.21 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
- Database: mysqli (Server: 5.7.34 / Client: mysqlnd 7.4.21)
- Browser: Chrome 114.0.0.0 (macOS)
- Theme: Twenty Twenty-Three 1.1
- MU-Plugins: None activated
- Plugins:
* WordPress Beta Tester 3.5.0",aparnajl
Tickets Awaiting Review,54320,There are no more thumbnails for uploaded PDFs,,Media,5.8.1,normal,normal,Awaiting Review,defect (bug),new,,2021-10-25T19:05:09Z,2022-08-24T14:45:09Z,"My current WP configuration
• PHP / MySQL version: 7.4
• Theme used: Camp Maine of TAM’S TRADING POST (no longer maintained)
• Extensions in place: activated: Akismet - BackWPup - contact Form 7 - Cookie Notice - Honeypot for Contact Form 7 - Ithemes Security - Post Type Switcher - SF Move Login - TablePress - WP Image Zoom - WP Maintenance Mode.
Name of the host: OVH
Site address: https://amapdlacrau.fr
Problems encountered:
The latest .PDF files uploaded to the media library have a generic file icon and no longer display the small thumbnail unlike older files. Clicking on the icon no longer opens the image of the 1st page of the file.
Everything I did that didn't work to fix the problem:
* Create PDFs with different tools; Microsoft, Do PDF, ApowerPDF ...
* Install WordPress version 5.8.1
* Downgrading the PHP version from PHP 8 to PHP 7.4 This fixed the problem with the imagik module, declared absent by the site health check in version 8, but not the thumbnail problem.
* Use an upload plugin: File Manager
* Use thumbnail regeneration plugins: Regenerate Thumbnails and Force Regenerate Thumbnails.
I have not tested: use a media management plugin instead of the media library
I note that the function for generating the thumbnails of the PDF files has stopped working when the theme is no longer maintained and the PHP version is the same. Only the version of WordPress has changed
",10rjulienk21
Tickets Awaiting Review,58483,UI issue in uploasd multiple media in mobile,,Media,6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-06-08T07:40:16Z,2023-06-08T07:40:16Z,"Hi,
We need to add padding on the right side for maintaining alignment on the right side in uploading multiple media on mobile.
The more informed nation you can see mentioned screenshot. ",sumitsingh
Tickets Awaiting Review,52373,URL returned by get_attachment_link() can 404.,,Media,4.4,normal,normal,Awaiting Review,defect (bug),new,has-patch,2021-01-25T23:51:23Z,2021-02-02T00:52:54Z,"The permalink returned by `get_attachment_link()` and `get_permalink( /* attachment */ )` can result in a file not found page in the following circumstances:
* The attachment's post parent has been deleted but `post_parent` is set (ie, post parent is pointing to an invalid ID).
* The attachment's post parent is an unregistered post type.
In both cases `get_permalink()` will return a URL in the format `w.org/attachment-name` that will 404 when visited on the front end of the website.
If pretty URLs are enabled, the URL should return `w.org/attachment/attachment-name` as the permalink.
Adding the following unit test will demonstrate the bug:
{{{#!php
set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
flush_rewrite_rules();
// Create temporay post type.
register_post_type( 'not_a_post_type', array( 'public' => true ) );
$post_id = self::factory()->post->create( array( 'post_type' => 'not_a_post_type' ) );
// Attach media to post of post type.
$attachment_id = self::factory()->attachment->create_object(
'image.jpg',
$post_id,
array(
'post_mime_type' => 'image/jpeg',
'post_type' => 'attachment',
'post_title' => 'An Attachment!',
'post_status' => 'inherit',
)
);
// Unregister post type.
foreach ( $wp_post_types as $id => $pt ) {
if ( 'not_a_post_type' === $pt->name ) {
unset( $wp_post_types[ $id ] );
break;
}
}
// Visit permalink.
$this->go_to( get_permalink( $attachment_id ) );
$this->assertQueryTrue( 'is_attachment' );
}
}}}
This looks to have been introduced in #1914
",peterwilsoncc
Tickets Awaiting Review,48194,"Unregistered image sizes used for IMG tag ""srcset""",,Media,,normal,normal,Awaiting Review,defect (bug),new,,2019-10-02T02:16:24Z,2020-07-21T06:25:14Z,"Following design changes, previously-generated thumbnails remain on the site, along with matching post meta entries linked to the respective attachment. WordPress then uses those to produce IMG tags.
In fact, these thumbnails are referenced even when the files don't exist on the site anymore, following a cleanup.
I think WordPress should only use thumbnail URLs for registered image sizes.
For bonus points, there can be a way to remove unregistered size references from attachment meta, perhaps in a Media > Audit admin page, which lets the user decide what to remove and what to keep.
For context, I've just cleaned images on a site and found a lot of legacy references to thumbnails of previously registered sizes in IMG tags. Media management and cleanup plugins I used could only detect the redundant meta data when I re-registered the old sizes temporarily.",galbaras
Tickets Awaiting Review,34465,Uploader in Media Modal Not Working When Certain Library Arguments Present,,Media,4.0,normal,normal,Awaiting Review,defect (bug),new,,2015-10-27T13:32:55Z,2017-09-18T00:16:15Z,"I noticed this bug while working on a plugin that deals with the media modal. I'm using the following code to create a media modal on a button view:
{{{
function frame(){
// Destroy the previous collection frame.
if ( this._frame )
{
this.stopListening( this._frame );
this._frame.dispose();
}
this._frame = wp.media( {
className: 'media-frame rwmb-media-frame',
multiple : true,
title : 'Select Media',
library : {
type : 'image',
},
frame: 'select',
} );
//Event stuff goes here
this._frame.open();
},
}}}
The issue is when uploading a file using the upload tab in the media modal. The file uploads but it never appears in the Media Library tab like it does in the core media modal used by the editor. The side Attachment Details panel shows the file information but the file itself doesn't appear on the grid. Attached is a screen cap from a user of the plugin. ",Funkatronic
Tickets Awaiting Review,40289,"Uploading 2 files with the same name but different casing, overwrites existing files",,Media,4.7.3,normal,normal,Awaiting Review,defect (bug),reopened,,2017-03-28T22:23:44Z,2017-06-08T09:36:11Z,"Problem: Under normal circumstances, if I upload a file to the media library but a file with a similar name was previously uploaded, wordpress would change the name of the new file (by adding a dash and a number).
However, If I upload 2 files with the same name, BUT WITH DIFFERENT CAPITALIZATION, wordpress won't rename the second file and will just reference the older one.
So if for example, I already had the file cover.jpg in my library and I've created a new post and uploaded the file COVER.JPG, it will show in the post the older image of (cover.jpg).",quickim
Tickets Awaiting Review,46793,Uploading files that the filename contains LTR and RTL characters cause filename change,,Media,4.9.1,normal,major,Awaiting Review,defect (bug),new,,2019-04-04T11:03:32Z,2019-04-11T13:32:52Z,I have uploaded some pdf files in the Media. The process goes well but when I am trying to access them the files are not found. I reviewed the uploads with ftp and I saw that the file names changed. For example a file that was uploaded with filename אילן-גל-פאר-english.pdf is changing to english.pdf-גל-פאר- with result to get 404 error.,VSotiris
Tickets Awaiting Review,59307,"Urgent, Uncaught TypeError: this.activateMode is not a function",,Media,6.3.1,normal,critical,Awaiting Review,defect (bug),new,,2023-09-07T08:06:16Z,2023-09-07T08:06:16Z,"It's very urgent. There is no response when clicking the media button on the add/edit article page.
Showing an error every click on the media button:
Uncaught TypeError: this.activateMode is not a function
at media-views.min.js?ver=6.3.1:2:59604
at It (provider.js:2:586804)
at Function.ma (provider.js:2:621991)
at n._createModes (media-views.min.js?ver=6.3.1:2:59564)
at n.initialize (media-views.min.js?ver=6.3.1:2:58973)
at n.initialize (media-views.min.js?ver=6.3.1:2:79857)
at n.initialize (media-views.min.js?ver=6.3.1:2:73432)
at n.initialize (media-views.min.js?ver=6.3.1:2:63143)
at h.View (load-scripts.php?c=1&load%5Bchunk_0%5D=wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks,jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquer&load%5Bchunk_1%5D=y-ui-sortable,underscore,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&ver=6.3.1:151:14648)
at n.constructor (load-scripts.php?c=1&load%5Bchunk_0%5D=wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks,jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquer&load%5Bchunk_1%5D=y-ui-sortable,underscore,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&ver=6.3.1:155:2602)",jjproitech
Tickets Awaiting Review,53944,Video resolution in portrait orientation,,Media,5.8,normal,normal,Awaiting Review,defect (bug),new,has-patch,2021-08-17T14:17:33Z,2021-08-17T17:07:51Z,"Hi!
I uploaded mp4 video file having portrait orientation and found that attachment metadata contains swapped width and height parameters. I see that WP is using getID3 library to read video metadata and found that it can detect when video is rotated.
I used following filter to fix that:
{{{#!php
resize(1000,null);
}}}
will return a WP_Error while according to the documentation it should resize based on $max_w alone.",chillhoptom
Tickets Awaiting Review,55323,When an image is edited the URL of the image is not updated,,Media,5.9.1,normal,normal,Awaiting Review,defect (bug),new,,2022-03-06T01:31:01Z,2022-03-07T19:34:24Z,"When an image is edited from the image editor, after an edit has been applied, the URL of the image is not updated due it always references back to the original image instead of referencing the image to the updated image (when the edit has been applied to all images sizes).
== Steps to replicate the problem.
1. Upload an image into the media library
2. After the image is uploaded into the media library click on Edit image
3. Apply an edit to the image, either rotate, flip or crop,
4. Make sure that the option is applied to all images sizes.
5. Click on Save
6. Observe how the URL of the image (see attached image), by clicking on Copy URL to the clipboard
7. Open the copied URL into a new tab the copied URL still references to the original image, and not the edited image instead.
",mitogh
Tickets Awaiting Review,55345,"When uploading image through featured image section, the image item count is wrong.",,Media,,normal,normal,Awaiting Review,defect (bug),new,,2022-03-08T17:45:56Z,2022-06-08T14:17:41Z,"When uploading image through featured image section, the image item count is wrong.
=== Env
* 5.9.1
* Brave, Chromium
* Win 10
* Theme : TT2
* Plugins: None
=== Test Instruction
* Open Post Editor and click on 'Set featured image' option.
* Notice the total number of existing images
* Upload a new image into the featured image section.
* Now notice the number of images (+2)
* Reload the page, and now the count corrects itself.
When uploading image directly to the featured image section of the post editor, the media item count works correctly.
",alanjacobmathew
Tickets Awaiting Review,49183,Width alignment issue in Edit attachment page,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-01-13T09:55:56Z,2020-01-13T20:11:52Z,"Hello,
There is an issue with the width in the edit attachment page.
First, go to the media page and open any image and edit that image and click on the button that says ""Edit Image"" and you can see the issue.
I am using a laptop having size of 1366 x 768.
https://youtu.be/A440xIRrUJU
Please see this video for the issue I am talking about.
",rnitinb
Tickets Awaiting Review,45980,WordPress 5.0.3 PDF is opening empty page in Chrome and not showing content,,Media,5.0.3,normal,normal,Awaiting Review,defect (bug),reopened,,2019-01-14T10:34:54Z,2019-01-30T07:38:23Z,"Hi,
I have some links that open pdf.
On firefox or safari, when I clic on the link, the pdf is opend on another page.
I can see the pdf.
On Chrome, when I clic, anoter page is open but the page is empty.
I can see on the url that the pdf is open
https://www.....de/wp-content/uploads/2018/07/TEST.pdf
but it is empty. And it worked before (not with WordPress 5.0.1)
And it doesn't work with new pdf too.
MAny thanks for you help",Timama
Tickets Awaiting Review,49995,WordPress creates unnecessary thumbnails,,Media,5.4,normal,normal,Awaiting Review,defect (bug),new,,2020-04-24T11:44:23Z,2020-04-26T12:09:32Z,"Hello,
I think I found a bug in WordPress 5.3 onwards, when **imagick is installed and activated** on the server (PHP 7.3, phpinfo attached).
To reproduce the problem:
1 - in /wp-admin/options-media.php check what sizes are set (defaults are: 1024x1024, 300x300x 150x150)
2 - upload an image with the same size as one of the three, let's say I upload this image https://via.placeholder.com/1024x1024
3 - WordPress uploads the image and generates the following files
1024x1024.png -> original image
1024x1024-1024x1024.png -> SHOULD NOT BE CREATED
1024x1024-768x768.png -> medium_large
1024x1024-300x300.png -> medium
1024x1024-150x150.png -> thumbnail
1024x1024-1024x1024.png should not be generated, it's also bigger than the original (3.5kB vs 6.3kB).
The same thing happens with the other sizes as long as the image size is the same as one of the sizes set in the options.
It doesn't happen on Wordpress 5.2.x and downwards.
To solve the problem imagick must be deactivated, using GD the problem doesn't happen.",XXVII
Tickets Awaiting Review,30402,WordPress does not respect the bit-depth of the original image when resizing,,Media,3.9.2,normal,normal,Awaiting Review,defect (bug),new,,2014-11-19T08:15:02Z,2021-03-04T15:09:12Z,"i have uploaded 8 bit depth indexed color png, near 1400x1800 size image in wordpress and inserted it into post , and original image was near 500 kB and the smaller width-height version made by wp is near 1400 kB, because it is 24 or 32 bits per pixel png.
(this is useless. i have edited html code to use full version because it is smaller by weight and it is scaled by size so it is ok).",qdinar
Tickets Awaiting Review,51243,[JS] Exception when setting or trying to upload a featured image in a post,,Media,5.5.1,normal,normal,Awaiting Review,defect (bug),new,has-patch,2020-09-04T09:43:43Z,2020-10-30T07:15:30Z,"I'm getting the following JS exception when trying to set or upload a featured image in a post. The editor then exits with an error message.
{{{
TypeError: this.obj._listeners is undefined
Backbone 5
t https://ig-klettern.org/wp-includes/js/media-views.min.js?ver=5.5:2
dispose https://ig-klettern.org/wp-includes/js/media-views.min.js?ver=5.5:2
dispose https://ig-klettern.org/wp-includes/js/media-views.min.js?ver=5.5:2
remove https://ig-klettern.org/wp-includes/js/media-views.min.js?ver=5.5:2
Underscore 3
Backbone 2
remove https://ig-klettern.org/wp-includes/js/media-views.min.js?ver=5.5:2
Underscore 3
Backbone 2
remove https://ig-klettern.org/wp-includes/js/media-views.min.js?ver=5.5:2
value https://ig-klettern.org/wp-includes/js/dist/media-utils.min.js?ver=9ad24b42cc69f241229ded4dc61409fb:2
Ii https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:104
$g https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:105
bh https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:105
ah https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:109
Ti https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:145
unstable_runWithPriority https://ig-klettern.org/wp-includes/js/dist/vendor/react.min.js?ver=16.9.0:26
Ma https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:52
Ia https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:140
ze https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:118
mg https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:53
unstable_runWithPriority https://ig-klettern.org/wp-includes/js/dist/vendor/react.min.js?ver=16.9.0:26
Ma https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:52
mg https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:52
V https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:52
Sb https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:213
Mg https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:85
e https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
t https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
o https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
o https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
b https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
p https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
s Redux
I https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
N https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
default https://ig-klettern.org/wp-includes/js/dist/block-editor.min.js?ver=6d92bbc61845b6652c64f83c59aee1f0:12
t https://ig-klettern.org/wp-includes/js/dist/block-editor.min.js?ver=6d92bbc61845b6652c64f83c59aee1f0:7
s https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
he https://ig-klettern.org/wp-includes/js/dist/rich-text.min.js?ver=a4056cfcb2aec8ceb3c8e8935dfd0bc4:7
react-dom.min.js:103:487
ve https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:103
callback https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:114
yg https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:62
xg https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:61
Ti https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:148
unstable_runWithPriority https://ig-klettern.org/wp-includes/js/dist/vendor/react.min.js?ver=16.9.0:26
Ma https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:52
Ia https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:140
ze https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:118
mg https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:53
unstable_runWithPriority https://ig-klettern.org/wp-includes/js/dist/vendor/react.min.js?ver=16.9.0:26
Ma https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:52
mg https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:52
V https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:52
Sb https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:213
Mg https://ig-klettern.org/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:85
e https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
t https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
o https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
o https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
b https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
p https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
s Redux
I https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
N https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
default https://ig-klettern.org/wp-includes/js/dist/block-editor.min.js?ver=6d92bbc61845b6652c64f83c59aee1f0:12
t https://ig-klettern.org/wp-includes/js/dist/block-editor.min.js?ver=6d92bbc61845b6652c64f83c59aee1f0:7
s https://ig-klettern.org/wp-includes/js/dist/data.min.js?ver=75f90354ddff4acd5b0b4026454037ca:2
he https://ig-klettern.org/wp-includes/js/dist/rich-text.min.js?ver=a4056cfcb2aec8ceb3c8e8935dfd0bc4:7
Uncaught TypeError: r is null
Ce https://ig-klettern.org/wp-includes/js/dist/rich-text.min.js?ver=a4056cfcb2aec8ceb3c8e8935dfd0bc4:7
fe https://ig-klettern.org/wp-includes/js/dist/rich-text.min.js?ver=a4056cfcb2aec8ceb3c8e8935dfd0bc4:7
he https://ig-klettern.org/wp-includes/js/dist/rich-text.min.js?ver=a4056cfcb2aec8ceb3c8e8935dfd0bc4:7
rich-text.min.js:7:29619
}}}
The following patch fixes the issue for me:
{{{
diff -u wp-includes/js/backbone.js.orig wp-includes/js/backbone.js
--- wp-includes/js/backbone.js.orig 2020-09-04 11:34:27.333611546 +0200
+++ wp-includes/js/backbone.js 2020-09-04 11:35:31.813714069 +0200
@@ -374,7 +374,7 @@
// Cleans up memory bindings between the listener and the listenee.
Listening.prototype.cleanup = function() {
delete this.listener._listeningTo[this.obj._listenId];
- if (!this.interop) delete this.obj._listeners[this.id];
+ if (!this.interop && this.obj._listeners) delete this.obj._listeners[this.id];
};
// Aliases for backwards compatibility.
}}}
",cryptomilk
Tickets Awaiting Review,55492,`Dismiss Errors` button alignment is not centered in Media Library.,,Media,5.9.2,normal,normal,Awaiting Review,defect (bug),reopened,has-patch,2022-03-31T04:20:58Z,2022-05-11T07:15:04Z,"When I drag/upload an SVG image in the Media library then it shows a mime types error and the ""Dismiss Errors"" button is not aligned properly.",iamjaydip
Tickets Awaiting Review,51058,attachment_url_to_postid does not retrieve post ID of really large images,,Media,5.3,normal,normal,Awaiting Review,defect (bug),new,has-patch,2020-08-19T02:12:58Z,2021-11-14T13:59:45Z,"Since WordPress now sets the `_wp_attached_file` meta value for very large images to use the scaled image:
{{{
amazing-road-in-pure-nature-picjumbo-com.jpg
}}}
becomes
{{{
amazing-road-in-pure-nature-picjumbo-com-scaled.jpg
}}}
any function which uses `attachment_url_to_postid` on a large image URL will not properly retrieve the image's post ID.
Use case: I use this function after removing intermediate image size strings to get the post ID of the uploaded image. I'm currently getting around this issue by inserting `-scaled` into the image URL and running the function again if a post ID is not returned, but I would prefer if WP could account for this, please.
Alternatively, if the WordPress function could manage the intermediate size conversion on its own, that would also resolve the issue by removing the need to remove it in the first place.",littler.chicken
Tickets Awaiting Review,57158,bug for image 2/3 ratio size when max height is 480px,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2022-11-21T00:13:46Z,2022-11-21T00:13:46Z,"When I upload a 2/3 size image (example: 700/1050px, 1000/1500px, etc.) and in the media settings (/options-media.php) I set the maximum height and maximum width to 480px, the medium size image (which measures 320px x 480px) is never displayed on wordpress.
this problem exists only for images resized in medium size. everything seems OK for small and large size.
I think this bug exists since several versions.
* screenshot settings : https://drive.google.com/file/d/1LAKzw2RHVDb3MskmQ4V86FX_eGw_XBEC/view?usp=sharing
* screenshot 320x480px medium size not displayed : https://drive.google.com/file/d/1EDcCVpwW4Cd21qn9JQldL2Q9EpwvF701/view?usp=sharing",tshak93
Tickets Awaiting Review,53193,chmod(): Operation not permitted in class-wp-image-editor-imagick.php,,Media,5.7.1,normal,normal,Awaiting Review,defect (bug),new,,2021-05-12T05:49:17Z,2021-05-12T13:15:24Z,"Hi
**Current install:**
Using the LATEST version of WordPress, the line numbers in this bug report relate to that version number.
The system is running on CENTOS with APACHE as the server.
**Problem Discription:**
PHP Warning: chmod(): Operation not permitted in ""wp-includes/class-wp-image-editor-imagick.php"" on line 710
**Explanation why this is a problem**
Every security conscious system administrator will have the following settings:
On directories e.g.
drwxr-x---. 10 editor apache 4096 Feb 19 2019 wp-content
drwxr-x---. 25 editor apache 12288 Mar 29 13:26 wp-includes
drwxr-x---. 4 editor apache 4096 Dec 11 17:10 themes
drwsrws---. 2 editor apache 4096 May 12 15:09 upgrade
drwsrws---. 20 editor apache 4096 Jan 1 00:00 uploads
On files e.g.
-rw-r-----. 1 editor apache 31328 Mar 29 13:25 wp-signup.php
-rw-r-----. 1 editor apache 4747 Dec 11 15:27 wp-trackback.php
While the apache server can READ every file, it cannot WRITE every file abd that is good! I have NEVER had a problem with these settings, ever.
Where the apache server NEEDS to write, it can (e.g. uploads/upgrade/cache)
I can happily update core/plugins/themes using FS_METHOD ssh2 with ssh keys set for the editor.
Also it is nearly IMPOSSIBLE to have the system being taken over as the apache server cannot write core files.
**Does the problem occur even when you deactivate plugins, use default theme?**
N/A
File system permission issue
**In case it's relevant to the ticket, what is the expected output or result?**
There needs to be an additional check whether the line SHOULD/CAN be executed.
On my system the editor is NOT the same as the user running the http server. The server user is MOSTLY (and should) restricted to reading (other that the upload/upgrade/cache/etc directories).
This will lead to errors on Linux based systems.
",jobst
Tickets Awaiting Review,50681,default-filters.php contains non-tweakable parameters,,Media,5.3,normal,normal,Awaiting Review,defect (bug),new,has-patch,2020-07-16T13:43:50Z,2020-09-26T01:02:19Z,"'default-filters.php' should NEVER use the ""plugins-loaded"" hook.
The reason being that this removes EVERY THEME DEVELOPER any kind of power around that setting.
Those ""default filters"" becomes ""definitive and non editable filter"" for theme developers.
For me this breaks my custom image size workflow
The best hook to replace ""plugins-loaded"" (according to wordpress's own documentation) would be ""init""
------ The Faulty line is in default-filters.php (l-526)-----------------
add_action( 'plugins_loaded', '_wp_add_additional_image_sizes', 0 );
---------------------------------------------------------------------
Also I don't understand why image sizes can't be more simple and centralized.
""thumbnail, medium, large"" are treated as wordpress option and are user editable
""medium_large"" is treated as an non-user-editable invisible wordpress option
NEW ""big_image_size_threshold"" which is a filter and basically a new image size (messes up the different image sizes names by the way)
NEW ""1536x1536 and 2048x2048"" that are hooked before any theme developers can access it which makes them non-editable for users and theme developpers.
The latest two (1536 and 2048) are indeed ""plugin developpers"" editable IF those plugin developers are willing to use bad practice and go for the ""plugins-loaded"" hook instead of the ""init"" hook.
This is breaking change for EVERY THEME DEVELOPPER and encourages bad practice for plugins developpers to interract with it.
This is very bad because EVERY DEVELOPPER should manages and have full control over his image sizes pipeline and avoid the default one at all costs. It's getting clunkier, less functionnal and more bloated with each update. It is really simple to fix but wordpress is really going the other way around and now preventing developers from working with it.",rsepierre
Tickets Awaiting Review,59195,deprecation notice triggered in post.php by passing null to parameter #2 in preg_match(),,Media,6.3,normal,normal,Awaiting Review,defect (bug),new,has-patch,2023-08-24T20:01:52Z,2024-02-15T17:32:16Z,"I've trying to force myself to use PHP 8.2 to get our plugins into shape, but am still running into a deprecation notice in post.php when viewing the Media Library in list mode:
{{{
PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /sites/test.example.com/files/wp-includes/post.php on line 3298
}}}
Checking if $real is true before preg_match() is run seems to fix this particular one, but maybe to be safe an is_string( $real ) should be run also?",nosilver4u
Tickets Awaiting Review,45562,drag and drop file upload fails with empty files when dragging from macOS Preview into WP on Safari 12,,Media,5.0,normal,normal,Awaiting Review,defect (bug),new,,2018-12-10T00:27:48Z,2020-11-19T15:39:30Z,"Part of my workflow involves opening multiple files in Preview (on macOS), and then adding them to WordPress by dragging and dropping them to the Add Media page in WordPress (running in Safari). That used to work fine, but when I upgraded to Safari 12.0, I get the error:
""File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.""
I'm using self-hosted WordPress (on both Ubuntu 11.04 or 11.10, with Apache 2.4 as the web server); I don't think I made any server-side configuration changes when this started happening, though it's possible I upgraded Apache versions at about the same time? This occurs in WordPress 5.0, and also occurred in WP 4.x versions; again, I don't think it was caused by a WP change, though I can't rule out a WP upgrade at about the same time.
This works fine when dragging and dropping from Finder, it's only when dragging and dropping from Preview.
To reproduce:
* Select multiple images and open them up in Preview.
* Go to Add Media in WordPress in Safari 12.
* Drag one of the images from the Preview sidebar to Wordpress.
I get the above file upload error when I do this.",dbcarlton
Tickets Awaiting Review,44127,editing an image can result in intermediate sized images left over after the image is deleted,,Media,4.9.5,normal,normal,Awaiting Review,defect (bug),new,,2018-05-17T19:51:02Z,2023-08-09T17:19:13Z,"Steps to reproduce:
1. set thumbnail_size to `150x150`
1. upload a `300x300` image, e.g., `foo.jpg`
* will result in `/wp-content/uploads/foo-150x150.jpg` being generated
1. edit the image and scale to `200x200`
* will result in something like `/wp-content/uploads/foo-e1526583456941.jpg` being generated
* `/wp-content/uploads/foo-150x150.jpg` will still be present, since it is still a valid thumbnail for the scaled image
1. regenerate intermediate sized images (e.g., by calling [[https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata/|wp_get_attachment_metadata()]] followed by [[https://developer.wordpress.org/reference/functions/wp_update_attachment_metadata/|wp_update_attachment_metadata()]], which the [[https://wordpress.org/plugins/regenerate-thumbnails/|Regenerate Thumbnails]] plugin does)
* will result in something like `/wp-content/uploads/foo-e1526583456941-150x150.jpg` being generated
1. ""Delete Permanently"" the image
Check `/wp-content/uploads` and you will see that `foo-150x150.jpg` is still there.
",pbiron
Tickets Awaiting Review,56295,filter wp_content_img_tag runs multiple times,,Media,6.0,normal,normal,Awaiting Review,defect (bug),new,has-patch,2022-07-27T23:25:04Z,2022-08-09T17:44:08Z,"Filter wp_content_img_tag seem (in a block theme) seem to run 3 times on content images and 2 times on custom logo image. Simple code to expose the problem:
add_filter( $hook_name='wp_content_img_tag', function( $filtered_image, $context, $attachment_id ){ return 'a:'.$filtered_image; },$priority=21, $accepted_args=3 );",gigito78
Tickets Awaiting Review,47619,i got error in /wp-includes/media.php,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2019-06-28T06:17:58Z,2019-06-28T12:38:30Z,in media php at line 3633 in $strings array you use objects without to check if this objects is exist... thanks!,Asaf Azoulay
Tickets Awaiting Review,53200,image quality reduction in smaller images,,Media,5.7.2,normal,normal,Awaiting Review,defect (bug),new,,2021-05-13T13:01:43Z,2021-05-13T13:01:43Z,"So what happens is you upload a full size image to wordpress in my case project53.co.uk and I am using a goodlayers theme but I have repeated the same process on a stoc install on a different site and have the same issue.
On this site for example the easiest one to see it on is the woman and look at the cheeks as full size looks ok and has colour and smaller images looks toned down and grey and it is wordpress changing the image quality with the smaller images.
this is the details send from our dev guy
For now - I have removed the thumbnails that the site was trying to use (I had set it to 'full', which should have been used, but the theme didn't want to co-operate) and then regenerated the thumbnails - pretty much forcing the site to use the full-size image.
It may occur elsewhere in the site - hard to say until I've seen every possible variation of an image on the theme - but as long as we repeat the same steps to remove the thumbnail size and regenerate, it will be fine.
You could just remove all regenerated sizes and ensure that sizes are set by the container the image is in; that would definitely stop it.
So if you see another image (or multiple images) having the same problem:
Inspect that image and see what thumbnail size it is using. (You can generally tell by the suffix on the end of the image name, e.g. blahblah-800x600.jpg)
Go into Goodlayers Options > Miscellaneous > Thumbnail sizing Remove the thumbnail size that it's using
Go into Tools > Regenerate Thumbnails
Ensure that the thumbnail size that you remove is not there
Click Advanced Options, and check the box which says ""Delete unselected thumbnails"" - this will remove that size from the server and tell WordPress it doesn't exist
If it was me - I'd unregister all of the thumbnails and just limit the size of images which are being uploaded - and use that size globally throughout the theme (if the size doesn't exist it should fallback to the full size image as default).
That doesn't necessarily have to be the case - but you just don't want 5MB images on a page - because then you'll have all the page speed problems to deal with!
",digitalmountain
Tickets Awaiting Review,46390,image_default_link_type is not seen by Gutenberg,,Media,5.1.1,normal,normal,Awaiting Review,defect (bug),reopened,,2019-03-01T12:34:42Z,2022-04-05T02:26:53Z,"I have in option.php the image_default_link_type set to file so that by default the ""link to "" for all media files is by default set to media.
Since upgrading to Gutenberg 5.1, this feature appears to be deactive.",brianjcameron
Tickets Awaiting Review,49640,image_get_intermediate_size returns wrong,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-03-13T10:25:35Z,2020-03-13T17:20:32Z,"The function `image_get_intermediate_size` isn't working as expected.
If I upload a `1200px x 900px` image as the original. In WordPress theme I use `wp_get_attachment_image( $post_id, array( '1x1-large', '1x1-medium' ) );`
`1x1-large` is setup using `add_image_size( '1x1-large', 1024, 1024, true );`
It will fail as, it cannot create this image size as the the original is smaller. However, the function in question is clever enough to look for other aspect ratios that match. This is good.
So if I had another name images called `1x1-medium` (setup using `add_image_size( '1x1-medium', 768, 768, true );` )
This will exist as the original image is large enough to be sized down to this.
The function however uses this this code-block to short-circuit it:
https://github.com/WordPress/WordPress/blob/46674e2367b8ca0c15b859bd578bc2119bfa0150/wp-includes/media.php#L780
{{{
// If there's an exact match to an existing image size, short circuit.
if ( intval( $data['width'] ) === intval( $size[0] ) && intval( $data['height'] ) === intval( $size[1] ) ) {
$candidates[ $data['width'] * $data['height'] ] = $data;
break;
}
}}}
So `$data['width'] =` each image sizes width and `$size[0] = '1x1-large'`
This will never match!!! $size should in theory be a string, not an integer.",CHEWX
Tickets Awaiting Review,54714,images deleted from media library still exist in upload directory,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2021-12-31T01:20:28Z,2021-12-31T13:39:45Z,"Currently its so easy to make storage full of all wp site which allow user to upload image.
Just upload big image all the time. Eventhough the admin of the website delete it permanently from media gallery. This files still exist in 'uploads' directory.
When media is deleted permanently from media library, all files for this images should also be deleted including the size variations.",erikdemarco
Tickets Awaiting Review,54205,jqxhr is undefined inside of deferred.done() when using wp.media to add a custom image upload,,Media,5.8.1,normal,major,Awaiting Review,defect (bug),new,,2021-09-30T20:55:42Z,2022-05-31T14:33:33Z,"I have done all the usual trouble shooting and found this is being cause by a new block of code added to wp-util.js in 5.8.1. Specifically lines 121-134.
The jqXHR property does not exist inside of the done() object and therefor always errors out. This is removing a key functionality of a clients admin that makes it where no new products can be added without a horrible workaround.",metawebdevelopment
Tickets Awaiting Review,39521,media_handle_sideload does not initialize the caption/excerpt value,,Media,2.6,normal,normal,Awaiting Review,defect (bug),new,,2017-01-09T02:58:05Z,2019-05-16T02:37:04Z,"In /wp-admin/includes/media.php changes have been made in the media_handle_upload() function to initialize the caption/excerpt value after an upload. Here's the code:
{{{#!php
$type,
'guid' => $url,
'post_parent' => $post_id,
'post_title' => $title,
'post_content' => $content,
'post_excerpt' => $excerpt,
), $post_data );
}}}
Corresponding changes should be made in the media_handle_sideload() function, which still has:
{{{#!php
$type,
'guid' => $url,
'post_parent' => $post_id,
'post_title' => $title,
'post_content' => $content,
), $post_data )
}}}
",dglingren
Tickets Awaiting Review,45212,mediaelement.js WordPress .mp4 videos not playing/working on certain browsers/devices,,Media,,normal,normal,Awaiting Review,defect (bug),reopened,,2018-10-28T04:46:14Z,2020-04-10T18:11:46Z,"Instead of the normal embedded Media Element video player working properly, on Safari Desktop and Safari/Chrome/Firefox on iPhone, the video player does not work. It's black and provides the actual video download beginning with mejs.download-file: https://cdn.elitesportsny.com etc. ...
Please help. Thanks. ",robsabo10
Tickets Awaiting Review,46544,mp3 file with different file mime type and content type when uploading should not be rejected,,Media,5.1,normal,major,Awaiting Review,defect (bug),new,,2019-03-17T02:51:33Z,2023-01-27T02:33:41Z,"{{{#!php
', ':', ';', ',', ""'"", '""', '&', '$', '#', '*', '(', ')', '|', '~', '`', '´', '!', '{', '}', '%', '+', 'ʻ','’', '«', '»', '”', '“', chr( 0 ) );
}}}",jdorner
Tickets Awaiting Review,43070,srcset attribute can be overridden but not prevented,,Media,4.4,normal,normal,Awaiting Review,defect (bug),new,,2018-01-11T19:07:48Z,2019-04-11T13:48:00Z,"In `wp_get_attachment_image()`, a `srcset` attribute can be passed to the fourth parameter to override the attribute's contents. There is no way to prevent this attribute from showing, though. An empty `srcset` attribute throws a validation error.",desrosj
Tickets Awaiting Review,44456,srcset max-width set to image width,,Media,4.9.6,normal,normal,Awaiting Review,defect (bug),new,,2018-06-25T14:53:48Z,2020-04-07T03:05:48Z,"My understanding is the max-width value in the image srcset should be limited to 1600px, however it is actually always set to the width of the original image. Also, max_srcset_image_width does not appear to be properly setting the max-width value either.
Thanks,
Mike",mikedunn
Tickets Awaiting Review,43540,srcset not added when the original image size doesn't exist in the database after regeneration,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2018-03-14T02:54:09Z,2024-02-27T18:54:22Z,"Suppose you have a post where you've inserted a 'large' image size. Any other image sizes of the same proportion are added to the srcset on the front end.
Now, change the 'large' image size to something else, and regenerate thumbnails (using the plugin, CLI, etc).
The image in the post continues to work (since plugins / CLI tend not to delete non-existing sizes from the file system precisely because they may be embedded in posts).
However, it no longer receives any srcset - because the src_matched variable never gets set to true in `wp_calculate_image_srcset`.
Can the src_matched logic be adjusted to cover this case?",smerriman
Tickets Awaiting Review,37581,"text overflows, if it has no hyphens on media upload error notices",,Media,4.5.3,normal,normal,Awaiting Review,defect (bug),new,has-patch,2016-08-05T09:34:58Z,2020-08-18T07:28:31Z,"Long text overflows and adding horizontal scroll in message box . if text has no hyphens, it extending beyond the parent div and look bad or worse, cause layout problems.
",gk.loveweb
Tickets Awaiting Review,59009,units missing in media details,,Media,,normal,normal,Awaiting Review,defect (bug),new,has-patch,2023-08-08T22:15:29Z,2023-08-09T21:47:37Z,"Some units are missing which have been there before, see #39667
Length and Dimensions have no units anymore. I don't know since when, just found out using v6.3
This is the view you get after clicking a video in media gallery (Attachment Details) and then click on ""Edit more details""",Presskopp
Tickets Awaiting Review,39331,unsharpMaskImage in Imagick's thumbnail_image is not compatible with CMYK jpegs.,,Media,4.5,normal,normal,Awaiting Review,defect (bug),new,,2016-12-19T15:31:11Z,2017-05-11T14:40:11Z,"This has been split off from #39216.
The use of `Imagick::unsharpMaskImage()` in `WP_Image_Editor_Imagick::thumbnail_image()` on jpegs with CMYK color spaces results in mangled images, eg black text becomes fuzzy and over-black, and colors change. The attached patch just doesn't call it if the image has a CMYK color space.
The unit test requires the attached ""test_cmyk.jpg"" to be uploaded to the test data images directory (which is actually the ""full"" jpeg produced by `WP_Image_Editor_Imagick` when processing the ""test_cmyk.pdf"" PDF uploaded to #39216).
",gitlost
Tickets Awaiting Review,36273,update_attached_file() on Windows will result in invalid image path when using native Windows directory separators,,Media,4.4.2,normal,normal,Awaiting Review,defect (bug),new,needs-unit-tests,2016-03-18T10:48:16Z,2018-04-30T23:34:09Z,"Calling ''update_attached_file( $image->ID, $file );'' on platforms like Windows can be really bad if ''$file'' was normalized/validated using PHP's ''realpath()'' function:
{{{#!php
ID );
// Well, in real world you could have created the path manually...
// The only important thing to know is, that we call ""realpath()"" which will
// convert any directory separator into the native directory separator:
// Linux will end with /dir/subdir/basename.jpg
// Windows will end with C:\Dir\Subdir\basename.jpg
$file = realpath( $file );
// Again, this is just a demo, for real world cases see plugins like ""Force Regenerate Thumbnails""
// But this is a valid API call:
update_attached_file( $image->ID, $file );
// On Windows this will result in an update statement like
// UPDATE `postmeta` SET `meta_value` = 'C:WWWSitesdemohtdocswordpresswp-contentuploads201603example.jpg' WHERE `post_id` = 123 AND `meta_key` = '_wp_attached_file'
// when $file was set to ""C:\WWW\Sites\demo\htdocs\wordpress\wp-content\uploads\2016\03\example.jpg""
// Now imagine a plugin which is re-generating thumbnails :]
// The problem is
// $meta_value = wp_unslash($meta_value);
// in wp-includes/meta.php update_metadata().
}}}
When using ''update_attached_file()'' we should make sure that ''update_metadata()'' don't update the path value to an invalid value...
PS: After you updated all image paths to an invalid value, the media library won't work anymore:
{{{
[18-Mar-2016 07:31:10 UTC] PHP Warning: file_exists() expects parameter 1 to be a valid path, string given in C:\WWW\Sites\demo\htdocs\wordpress\wp-includes\media.php on line 3063
}}}
",Whissi
Tickets Awaiting Review,39492,upload_post_params and plupload_init filters are not being executed on wp_print_media_templates(),,Media,4.7,normal,normal,Awaiting Review,defect (bug),new,,2017-01-05T20:17:11Z,2018-01-04T18:38:02Z,upload_post_params and plupload_init filters are not being executed on the new media upload form located in wp-includes/media-template.php => wp_print_media_templates().,llvasconcellos
Tickets Awaiting Review,47889,uploading image contains special characters will return a wrong image url,,Media,5.2.2,normal,normal,Awaiting Review,defect (bug),new,has-patch,2019-08-17T10:57:02Z,2019-08-18T03:46:56Z,"How to reproduce this bug?
1> ready an image, make sure it contains a special character, such as `^`. In my case, this image file is `test^image.jpg`
2> goto page 'Upload New Media', that is './wp-admin/media-new.php'
3> select your image file and upload it.
4> in the completion list, you will see a thumbnail and the image that you uploaded. (see attachment )
5> the thumbnail is broken, and the URL of the thumbnail is `'.../testimage.jpg'`. actually, it's should be `'.../test^image.jpg'`
",sockscap64
Tickets Awaiting Review,59573,warning: trying to access array offset on value of type bool in wp-includes/media.php,,Media,6.3.1,normal,normal,Awaiting Review,defect (bug),new,,2023-10-09T16:14:04Z,2023-10-26T17:04:39Z,"{{{
function image_get_intermediate_size($post_id, $size = 'thumbnail')
{
$imagedata = wp_get_attachment_metadata($post_id);
// Checking whether $imagedata and $imagedata['sizes'] are real arrays.
if (!is_array($imagedata) || empty($imagedata['sizes']) || !is_array($imagedata['sizes'])) {
return false;
}
// Checking whether $size has a valid structure.
if (!is_array($size) || count($size) < 2) {
return false;
}
$data = [];
}}}
.....",androidforlife
Tickets Awaiting Review,41372,when no any media. at that time this section is not usable. so Please hide when no any media.,,Media,,normal,major,Awaiting Review,defect (bug),reopened,,2017-07-20T07:57:16Z,2017-11-06T06:02:03Z,When no any media at that time this section is not usable. So please hide when no any media.,rushabh4486
Tickets Awaiting Review,56071,wordpress images too large,,Media,6.0,normal,normal,Awaiting Review,defect (bug),new,,2022-06-25T13:51:58Z,2022-10-26T15:45:15Z,"How is it that an optimzed .png of 1081x753 with file size 61.5KB is converted to 1024x713.png and occupies 527.31KB. Overall WP increased the environmental impact of that one image ten fold, and as I publish about 100 or so of such images weekly server space is also occupied unnecessary.
The WP generated file of 527.31K optimises to 106K.
Also if I upload the optimised 1024x713.png of 106K, then WP generates a duplicate of 527.31K instead of just copying it.
I read it is no longer permissible, as was in the earlier releases of WP, to disable the auto generation of of 'large', 'medium-large' etc. files.
Also google degrades sites that serve unoptimized content. I consider this as defect and thus report it as a bug, if yo do not think so, please reassign to enhancements.
",antonv
Tickets Awaiting Review,36437,wp_delete_attachment causes warning,,Media,2.0,normal,normal,Awaiting Review,defect (bug),new,needs-unit-tests,2016-04-07T06:24:34Z,2017-07-27T16:26:17Z,wp_delete_attachment assumes that attachments uses category and post_tag taxonomies. This causes a warning in wp_delete_object_term_relationships when post type attachment is not using category or post_tag taxonomies.,thorbrink
Tickets Awaiting Review,47868,"wp_delete_attachment returning successfully, deleting all DB data, but NOT deleting files, and NOT returning false",,Media,,normal,normal,Awaiting Review,defect (bug),new,dev-feedback,2019-08-13T12:03:06Z,2019-08-20T04:16:29Z,"from
https://wordpress.stackexchange.com/questions/344976/wp-delete-attachment-returning-successfully-deleting-all-db-data-but-not-delet?noredirect=1#comment505976_344976
I digged into wp_delete_attachment here https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-includes/post.php#L5450 , it calls wp_delete_attachment_files
wp_delete_attachment_files returns false on failure, but this is ignored! in wp_delete_attachment. Now I'm not gonna go on a rant how bad that 'design' is. My question is, how can I make sure that the files DO get deleted?
I'm calling
{{{
$attachments = get_attached_media('', $post->ID);
foreach ($attachments as $attachment) {
wp_delete_attachment($attachment->ID, true);
wp_delete_attachment never returns falsy.
}}}
How can I figure out and fix wp_delete_attachment ?
in my case it seems that some post_meta might be damaged, as the file location sometimes can be lost for some reason. This should return false or better throw and error",Jossnaz
Tickets Awaiting Review,45913,wp_enqueue_media() - slow query,,Media,5.0.3,normal,normal,Awaiting Review,defect (bug),new,,2019-01-10T17:11:32Z,2020-04-01T09:25:14Z,"I have sites with very large databases and I've noticed some slow queries since 5.0.3 on new/edit post screens:
{{{
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM wp_posts
WHERE post_type = 'attachment'
ORDER BY post_date DESC
}}}
This query is coming from wp_enqueue_media()
I am using php 7.2.1, MySQL 5.7.24",lubimow
Tickets Awaiting Review,53187,wp_filter_content_tags added too early,,Media,5.5,normal,normal,Awaiting Review,defect (bug),new,,2021-05-11T19:15:40Z,2021-07-26T16:31:46Z,"Currently wp_filter_content_tags filter is added to the_content filters with default priority, this means that if the iframe is outputted by shortcode it will not get the lazy loading attribute.
I think that it should be added after do_shortcode has run with priority of 12.",maciejmackowiak
Tickets Awaiting Review,58647,wp_generate_attachment_metadata generates scaled images,,Media,6.2.2,normal,major,Awaiting Review,defect (bug),new,,2023-06-27T21:34:17Z,2023-06-27T21:34:17Z,"When using wp_generate_attachment_metadata() it seems to ignore the filter to turn off ""big_image_size_threshold"".
add_filter( 'big_image_size_threshold', '__return_false' );
$generateThumbs = wp_generate_attachment_metadata( $attachmentId, $file );
This results in a scaled version of the media being created and _wp_attached_file meta being replaced with the scaled versions path.
",picard102
Tickets Awaiting Review,32117,wp_get_attachment_metadata sizes array file misses path if using year/month organizing,,Media,4.2,normal,normal,Awaiting Review,defect (bug),new,,2015-04-24T15:58:51Z,2017-08-14T13:15:29Z,"wp_get_attachment_metadata returns array like this:
{{{
[""metadata""]=>
array(5) {
[""width""]=>
int(3072)
[""height""]=>
int(2304)
[""file""]=>
string(25) ""2015/03/GC702D01_high.jpg""
[""sizes""]=>
array(4) {
[""thumbnail""]=>
array(4) {
[""file""]=>
string(25) ""GC702D01_high-200x150.jpg""
[""width""]=>
int(200)
[""height""]=>
int(150)
[""mime-type""]=>
string(10) ""image/jpeg""
}
}}}
as you can see, ""file"" in the first level of the array contains year and month (as i do have turned on organizing in year/month structure for uploads), but ""file"" in the second level for (e.g. in this case) the thumbnail size is only the file name, without the path.
This is at least confusing, make it difficult to get the URL of the file - each size need to be then requested separately by wp_get_attachment_image_src function.
IMO optimal solution would be to use full path in both `$metadata['file']` and `$metadata['sizes'][$size]['file']` so the same name would have the same structure. But i do not know if it wouldn't have some compatibility issues.
Less optimal imo would be to add there also the path - it can be there only once in the top level, as all sizes are currently always in the same folder, but i think this could lock us from possible changes / plugin modifications etc. E.g. I think that it would be great, if it would be possible (and even default) to have size name, as a folder, so that we would have thumbnails in uploads/thumbnail, medium size in uploads/medium ... - this would highly reduce the number of images in one folder in default settings and would reduce the problems with displaying them on most systems. And also if we would want to delete some defined size, we could simply delete one folder and save space.
So the second optimal would be to show the path in `sizes[$size]` subarray, e.g.
{{{
[""metadata""]=>
array(5) {
[""sizes""]=>
array(4) {
[""thumbnail""]=>
array(4) {
[""file""]=>
string(25) ""GC702D01_high-200x150.jpg""
[""path""]=>
string(25) ""2015/03/""
}
}}}",thomask
Tickets Awaiting Review,53121,wp_get_image_mime() - something weird going on,,Media,4.8,normal,minor,Awaiting Review,defect (bug),new,,2021-04-30T17:29:42Z,2021-05-01T01:58:35Z,"Okay, eh... help... so this is a weird one to write up.
In the context of #53009, @hellofromTonya and me are looking at all calls to `markTestSkipped()` in the test suite.
One of the ones I was looking at is this test in `tests/phpunit/tests/functions.php`:
{{{#!php
markTestSkipped( 'The exif PHP extension is not loaded.' );
}
$this->assertSame( $expected, wp_get_image_mime( $file ) );
}
}}}
for the [https://developer.wordpress.org/reference/functions/wp_get_image_mime/ `wp_get_image_mime()`] function.
Now, there are two questions I have:
1. Why is `is_callable()` used for `exif_imagetype` and `function_exists()` for `getimagesize` ? This is the same in the actual function as well as the test, but strikes me as odd. Why not use `function_exists()` (or `is_callable()`) for both ?
2. I've been trying to verify the conditions by running the test with the Exif and GD extensions in various states - both enabled, GD disabled - Exif enabled, GD enabled - Exif disabled, both disabled - and I can only seem to make the test hit the skip condition with Exif disabled. Tested on both PHP 5.6 as well as PHP 7.4.
I've checked the PHP docs and the [https://www.php.net/manual/en/function.getimagesize.php `getimagesize()`] function is listed as part of the GD extension and the manual doesn't say anything explicitly about it being available independently of the extension, so the condition ''seems'' justified, but the fact that I can't seem to get the test to fail is making me want to dig deeper.
Related to #11946 and #40017. The original function was introduced in [39831], the tests in [40397].
Pinging @joemcgill - would you happen to be able to give me some insight into what's happening here ?",jrf
Tickets Awaiting Review,51421,wp_get_missing_image_subsizes returns thumbnail sizes for animated GIFs,,Media,5.5.1,normal,normal,Awaiting Review,defect (bug),new,,2020-09-30T14:27:32Z,2020-10-01T14:36:20Z,"While thumbnails are not created for animated GIFs to avoid the problem of users picking a thumbnail size to insert into their content and unexpectedly getting a static image instead of an animated GIF, they are generated for static GIFs.
The `wp_get_missing_image_subsizes` function however recognizes animated GIFs as an image format that can have subsizes generated, and so returns a list of missing thumbnail sizes that will never be created.
This causes problems for various plugins when checking whether all required thumbnails exist before commencing processing the GIF etc.",ianmjones
Tickets Awaiting Review,57813,"wp_get_missing_image_subsizes() can give error if image_meta exists, but not height/width",,Media,6.1.1,normal,normal,Awaiting Review,defect (bug),new,has-patch,2023-02-26T21:47:16Z,2023-10-28T15:24:29Z,"I have an SVG file attached as image. The function throws an error:
{{{
if ( ! empty( $imagesize ) ) {
$full_width = $imagesize[0];
$full_height = $imagesize[1];
} else {
$full_width = (int) $image_meta['width'];
$full_height = (int) $image_meta['height'];
}
}}}
on the else case. The below patch will resolve.
This is with 6.1.1
{{{
--- /app/wp-admin/includes/image.php.orig 2023-02-26 21:42:57.687046116 +0000
+++ /app/wp-admin/includes/image.php 2023-02-26 21:40:41.349180739 +0000
@@ -89,11 +89,11 @@
$registered_sizes = wp_get_registered_image_subsizes();
$image_meta = wp_get_attachment_metadata( $attachment_id );
// Meta error?
- if ( empty( $image_meta ) ) {
+ if ( empty( $image_meta ) || !array_key_exists('width', $image_meta) || !array_key_exists('height', $image_meta) ) {
return $registered_sizes;
}
// Use the originally uploaded image dimensions as full_width and full_height.
if ( ! empty( $image_meta['original_image'] ) ) {
}}}
",donbowman
Tickets Awaiting Review,55872,"wp_image_add_srcset_and_sizes trys to parse images from external pages, fails with error",,Media,6.0,normal,normal,Awaiting Review,defect (bug),reopened,,2022-05-30T08:08:17Z,2023-02-16T19:31:44Z,"If a user embeds image content from another domain by copy pasting and includes a tag like
{{{
}}}
it seems like wordpress trys to parse the file as it were hosted in its own instance. This won't work of course, because it cannot access the file in the filesystem. It then fails with the following warning:
{{{
PHP Warning: Undefined array key ""file"" in /wp-includes/media.php on line 1676""
}}}
",pampfelimetten
Tickets Awaiting Review,58304,wp_update_image_sizes,,Media,6.2,normal,blocker,Awaiting Review,defect (bug),new,has-patch,2023-05-13T14:20:43Z,2023-06-29T17:37:30Z,"This blocker issue is actually introduced with WP 5.3 and still remains unsolved up to 6.2
Introduction:
Function {{{wp_update_image_sizes}}} calls function {{{_wp_make_subsizes()}}} in two ways/paths, either via function {{{wp_create_image_subsizes()}}} or {{{directly}}}.
Issue:
When {{{function wp_update_image_sizes}}} calls {{{_wp_make_subsizes()}}} via {{{wp_create_image_subsizes()}}}, {{{filter intermediate_image_sizes_advanced'}}}, is invoked before calling {{{_wp_make_subsizes()}}}.
When {{{wp_update_image_sizes}}} calls {{{_wp_make_subsizes()}}} directly, {{{filter intermediate_image_sizes_advanced'}}} is not available at all.
Problem:
When {{{filter 'intermediate_image_sizes_advanced'}}} is not available, there is no way to filter $new_sizes argument before {{{_wp_make_subsizes()}}} for the purpose described in {{{function _wp_make_subsizes()}}}, {{{(see below)}}}:
{{{
/*
* Only checks ""size name"" so we don't override existing images even if the dimensions
* don't match the currently defined size with the same name.
* To change the behavior, unset changed/mismatched sizes in the `sizes` array in image meta.
*/
}}}
Proposed solution:
1) Modify {{{filter 'intermediate_image_sizes_advanced'}}} by adding new argument {{{$context argument}}} in same way like {{{filter 'wp_generate_attachment_metadata'}}} added {{{$context argument}}} since WP 5.3.
2) In {{{function wp_update_image_subsizes}}}, before calling {{{function _wp_make_subsizes()}}}, add {{{apply_filters 'intermediate_image_sizes_advanced'}}} with additional argument {{{$context}}} and value {{{'update'}}}.
3) In {{{function wp_create_image_subsizes}}}, in {{{$new_sizes = apply_filters( 'intermediate_image_sizes_advanced', $new_sizes, $image_meta, $attachment_id )}}} add new {{{$context}}} argument value {{{'create'}}}.
OR in {{{function wp_update_image_subsizes}}} before calling {{{function _wp_make_subsizes()}}} just add {{{apply_filters 'intermediate_image_sizes_advanced'}}}
OR just make some filter that available in both cases. Maybe inside {{{function _wp_make_subsizes()}}} at the beginning ??
Thanks",logotronic
Tickets Awaiting Review,60178,wp_video_shortcode() outputs invalid HTML,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2024-01-02T22:09:17Z,2024-02-15T07:25:42Z,"Did an audit of a website and found several invalid HTML for video tags that were output with `wp_video_shortcode()`. The errors:
* Bad value `1` for attribute `loop` on element `video`
* Bad value `1` for attribute `autoplay` on element `video`
* Bad value `1` for attribute `muted` on element `video`
Based on documentation from Mozilla, all 3 are boolean attributes. Here is an example of function usage that produced the HTML validation errors:
{{{#!php
wp_get_attachment_url(9999),
'class' => 'my-custom-video',
'poster' => '',
'loop' => 'true',
'autoplay' => 'true',
'muted' => 'true',
'height' => 1080,
'width' => 1920
] );
}}}
This part in `wp_video_shortcode()` is the culprit:
{{{#!php
$v ) {
$attr_strings[] = $k . '=""' . esc_attr( $v ) . '""';
}
}}}
Currently, we are using the filter to clean up these attributes like this:
{{{#!php
` directly on it, it will fail with the warning: `Warning: Can't find ""Image Name"" (ID 191697).`
So I believe the issue is that WordPress is looking for the original image name, that does not have the -scaled postfix, however, for some reason it deos not exist. I have made a shellscript to copy all images in the ""uploads"" directoy that has the -scaled.jpg to it's equivilant image name without -scaled, e.g.
`cp image-scaled.jpg image.jpg`
I am not sure what caused this, but surely it brings a lot of missing images on our website as theres no thumbnails.",mattiasf
Candidates for Closure,58013,Copy URL To Clipboard Fails After 1 Use,,Media,6.1.1,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2023-03-29T19:00:50Z,2023-04-05T15:04:26Z,"When editing a post/page, I click to insert media, click ""Copy URL to clipboard"" on any media in the Library modal and paste into my page (or outside of WP into Notepad etc.)
Then, without saving or refreshing repeat the process (insert media, copy url to clipboard) and on the second and subsequent pastes it fails and re-pastes only the first link
I've seen this behavior on 12+ sites, using different themes, all running the current WP - I see this behavior both in Chrome, and Firefox",colewebdev
Candidates for Closure,49624,Error message when uploading video,,Media,,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-03-11T16:05:59Z,2020-03-12T15:06:40Z,"Uploading .MP4 video file to the media library and receiving an error message.
File does not show up in the media library.
File is 406 MG.
Limit for upload shows as 1GB.
Please use simple language when answering. No experience in coding. Minimal experience in building websites.
Thank you.",heavenberg
Candidates for Closure,56183,Icon not appearing,,Media,6.0,normal,minor,Awaiting Review,defect (bug),new,reporter-feedback,2022-07-08T20:59:30Z,2023-10-25T04:58:36Z,"The icon set in the customizer does not create an icon, or even a tag.",cjcodingyu8am1
Candidates for Closure,50238,Image rotation still an issue with images shot from above,,Media,5.4.1,normal,major,Awaiting Review,defect (bug),new,reporter-feedback,2020-05-24T19:26:00Z,2022-03-16T16:38:31Z,"It seems like this bug is considered dealt with but I am still having the problem even while using 5.4.
When I try to upload an image directly from my phone either by taking it with the camera or uploading from my photo library it strips the EXIF. It only seems to happen when I am taking a photo from above as in scanning a document or photo.
It only seems to happen when I upload the image using my iPhone 11 or iPad Pro.
Obviously something was missed when this was finally “fixed.”",wmassjunction
Candidates for Closure,50210,Image upload stuck - Upload files,,Media,5.4.1,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-05-19T16:14:31Z,2022-03-16T16:20:19Z,"When I try to upload an image in the admin media, it gets stuck when processing... the browser freezes completely, I tried it with firefox and chrome. The problem remains the same. The browser freezes and I can do nothing more than close the browser. I can't upload files anymore.",bustel
Candidates for Closure,51133,Image uploaded through third party plugin showing in media but not showing up in post,,Media,5.5,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-08-25T07:46:26Z,2023-01-31T13:13:54Z,"I created a plugin which uploads Image to upload folder. It sends blob through ajax and uses wp_insert_attachment insert as attachment, wp_generate_attachment_metadata to generate meta data and uses wp_update_attachment_metadata to update meta data of attachment. And it shows up in media without file name and when I pragmatically insert attachment to the post using wp_get_attachment_image , it only display's attachment's name not image file. ",ujw0l
Candidates for Closure,50256,Inconsistent image handling in wp_create_image_subsizes.,,Media,5.3,normal,major,Awaiting Review,defect (bug),new,reporter-feedback,2020-05-26T18:33:19Z,2022-03-16T16:51:25Z,"New ""big image handling"" uses $editor->resize() which will not only resize, but also loosely compress JPEG image (degrade image quality) by invoking $editor->thumbnail_image() inside $editor->resize().
Rotating image below ""big image handling"", about line 322 in image.php uses $editor->maybe_exif_rotate(), which will not further degrade image quality.
Until WP version 5.3, media editor page was always starting with original/upload image quality, which is not case after WP 5.3+ ""big image handling"" is triggered.
IMHO, media editor page should never get ""thumbnalized"" image as starting point for further editing by user.",ddur
Candidates for Closure,51235,Insert Media from URL: blank screen,,Media,5.5.1,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-09-03T18:17:10Z,2020-09-05T12:39:31Z,"When trying to add media to a page. If the option ""Insert from URL"" is selected, a blank screen is presented with no ability to enter a url. This is present in Single and multisite versions of WordPress 5.5.1 and has been persistent for the last several versions. the PHP version is 7.4.9 but has also been an issue with earlier versions.",jbb0906
Candidates for Closure,50126,Latest large Image size compression generating incorrect file permissions,,Media,5.4.1,normal,major,Awaiting Review,defect (bug),new,reporter-feedback,2020-05-08T08:31:10Z,2022-03-16T16:27:33Z,"The Latest large Image size compression is generating incorrect file permissions. I have tested on all 5 of my sites. I have also eliminated all plugins and themes and built a new site to test. Not sure about other platforms or servers, but I use Microsoft IIS-10. if you correct the permissions through the O/S WordPress changes them back (only for ""Large Size"", I have tried a variety of other compression plugins and added various PHP coded to functions.php (tried in 3 Themes) and even wrote a plugin to disable the compression, the thumbnails and all other sizes work and show correctly, just not the Large Size, the problem does get corrected if you increase or decrease the ""aspect ratio"" of the ""large size"" image, but that has to be done manually and I must have over 10,000 images. The problem started about 2 or 3 months ago (with the latest 2 or 3 versions of WP), thanks",michael.moody
Candidates for Closure,50932,Lazy load conflict,,Media,5.5,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-08-12T08:38:46Z,2020-08-12T10:55:04Z,"Hi, i have installed a cache plugin. This plugin has lazy load option. I turned it off to check how WordPress 5.5 lazy load work. I noticed it doesn't work properly. I checked the source code of the website and search ""lazy"", i saw there was no lazy option. However when i turned lazy load option from third party plugin, I faced a problem. It's i cannot visit website without logged in. If i logged in i can visit.",azad241
Candidates for Closure,58364,Lottie Files not centered properly,,Media,,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2023-05-20T10:29:12Z,2023-10-25T04:48:40Z,"Hi, I want to tell you, that Lottie Files are not working properly in WordPress. I use them on several pages, align is set to center, but they actually are not centered. Some of them are aligned to lef, some of them are moved little bit to left.",Samuel222
Candidates for Closure,23436,Media Gallery - Cropping Image and then Cropping a thumbnail from that crop doesn't work.,joedolson*,Media,3.5,normal,normal,Awaiting Review,defect (bug),accepted,close,2013-02-10T17:20:00Z,2022-12-07T16:05:48Z,"'''A recipe for repeating the bug behavior:'''
Navigate to Library in the admin sidebar.
Click ""Add new"".
Drag the 800x480 copy of this or any image to the drag and drop area:
http://en.wikipedia.org/wiki/File:Cheese_platter.jpg
(I suggest this image for ease of recipe duplication and best explanation.)
After the blue status bar has completed, ""Edit"" to bring the media edit window up in a new tab.
Click ""Edit Image"" below the actual image.
Drag anywhere inside the image to create a cropping box.
In the ""Image crop"" pane, set the crop area to 500px width, 100px height.
Drag the cropping box so that the fancy toothpick is as far left as possible along the horizontal axis of the cropping box, but centered vertically.
Click the ""Crop"" icon. Click ""Save"". Click ""Update"".
Click ""Edit Image"" once again.
Drag inside the newly-cropped image again to create a new cropping box.
In the ""Image Crop"" pane, change the cropping dimensions to 150 x 100.
Drag the box so the fancy toothpick is somewhere in the left third within the crop boundary.
'''Important:''' In the thumbnail settings pane, set ""Apply Settings to:"" '''Thumbnail'''.
Click the ""Crop"" icon. Click ""Save"". Click ""Update"".
Click ""Library"" in the admin sidebar.
The newly preferred thumbnail for our previously-cropped image does not save. Thumbnail remains default, based on center of previously-cropped image. Instead, you will see a small wheel of cheese sliced into six wedges with garnishes for the thumbnail, even though we chose the part with the fancy toothpick.",gr33nman
Candidates for Closure,49078,Media Library permission checks in WordPress,,Media,5.3.2,normal,major,Awaiting Review,defect (bug),new,reporter-feedback,2019-12-24T13:19:41Z,2020-03-12T14:36:07Z,"
If permissions to ~/uploads/ are not set correctly (or was modified in some manner), deleting media will only delete database references (item(s) will disappear from the Media Library view) but the actual files are not deleted.
However, when uploading media, permission errors are displayed.
This seems to be the the default behavior.
When was the last time you checked the contents of ~/uploads/ directory?
",danskoya
Candidates for Closure,59192,New image crop interface don't work in windows 10. Scale works.,,Media,6.3,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2023-08-24T18:33:19Z,2023-08-29T21:44:29Z,"Win 10, 64GB RAM, Plenty SSD
Shared hosting, Dreamhost
Browsers tried: Chrome, Brave, Firefox, even Opera...
Loving the new image-edit interface concept, but:
Media -> Select Image -> Edit Image -> Crop -> AR: 1:1 -> Apply Crop -> ... Nothing
Save Edits remains gray. No changes made.
Media -> Select Image -> Edit Image -> Scale -> New Dim: 500w -> Scale ... ""Image Saved"" notice. ""Save Edits"" remains gray. Changes saved.
I'm trying to scale and crop an image. It looks like a better workflow than before, but this crop is still a no-go.
I am pretty familiar with the old method, so the new method will certainly be an improvement. I use WordPress's crop function regularly. I'd love to see the fixed asap.
Hope this helps.
Chris",Laughter On Water
Candidates for Closure,30691,Removing a featured image does not remove the 'post_parent' value - reproducible,,Media,,normal,major,Awaiting Review,defect (bug),reopened,dev-feedback,2014-12-12T12:38:49Z,2021-04-28T16:18:49Z,"Removing a featured image does not remove the 'post_parent' value in the wp_posts row associated with the attachment. This causes invalid results when using functions like get_children() and get_posts().
1) install a fresh copy of WordPress 4.0.1
2) edit the first post and add a featured image
3) use phpMyAdmin and look at the wp_posts table. You will see an entry for the attachment and the 'post_parent' column will be set to the ID of the first post
4) Edit the first post and remove the featured image
5) again use phpMyAdmin and look at the wp_posts table. You will see the entry for the attachment and the 'post_parent' column WILL STILL BE SET to the ID of the first post.
to see a example of an error with get_children() do the following after doing the above.
1) activate twenty-thirteen and view the site
2) edit twenty-thirteen's 'content.php'. Line 15-19 should be
{{{
}}}
add the following right after it.
{{{
'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID );
$attachments = get_posts($args);
if (! empty($attachments)) {
echo 'attachment ID ='.$attachments[0]->ID.'
';
echo 'attachment post_parent ='.$attachments[0]->post_parent.'
';
echo '$post->ID ='.$post->ID.'
';
echo '
guid . '""/>';
var_dump($attachments);
}
?>
}}}
3) view the site and you will see the featured image.
4) use phpMyAdmin edit the entry for the attachment and set the 'post_parent' column to '0'.
5) view the site and you will NOT see the featured image.
",juggledad
Candidates for Closure,48788,Run time crop image not working using wp_get_image_editor,,Media,5.3,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2019-11-25T14:16:27Z,2020-01-16T15:35:00Z,"it's not working run time crop image
{{{#!php
set_quality($quality);
$editor->crop($srcX, $srcY, $srcW, $srcH, $destWidth, $destHeight);
$saved = $editor->save($destFileName);
}}}
=============================
Problem for ""$editor->crop()"" while source image size is smaller than destination image size.
{{{#!php
crop($srcX, $srcY, $srcW, $srcH, $destWidth, $destHeight);
}}}
",ahmed17
Candidates for Closure,40631,Safari issues with wp-includes/ms-files.php,,Media,4.7.4,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2017-05-02T07:33:43Z,2020-07-28T10:19:56Z,"We have a multi-site network with over 200 sites on it.
Whilst the network is running WP 4.7.4–en_AU the network was originally built on a version prior to 3.5 and has been continually updated as versions become available. That being said, our network still uses the old file structure wp-content/blogs.dir/[site#]/files to store media. I've tried converting this over with no success and haven't really been able to find any good resources to help me do this beyond the things I've tried.
So, our network continues to use the above path with the compatibility option of using wp-includes/ms-files.php which is called in the .htaccess file.
However, there seems to be a bug in the ms-files.php that are causing some resources not to load properly when the sites are loaded into Safari or an iOS device.
1. PDF documents fail to load
2. CSS files that have been cached by our theme (it has it's own caching function) also fail to load.
I've narrowed down the culprit to the lines of code in ms-file.php that output the headers. If I comment out the code on line 43:
{{{#!php
header( 'Content-Length: ' . filesize( $file ) );
}}}
...then the problem goes away. Not sure what impact commenting the above has but it doesn't seem to break the site so I've left it commented out.
My best guess is that Safari doesn't like this header being sent out separately from the earlier one on line 41. It may even be a bug with Safari - not sure on this one.
Anyway, thought I'd report it here to begin with.
Cheers
Chris
",Brandicoot
Candidates for Closure,49900,Updates to Image Processing in WordPress 5.3 - Broken Intrinsic Sizing?,,Media,5.3,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-04-13T23:24:20Z,2020-05-14T22:46:41Z,"Hello WordPress Wizards,
I am a bit late to learning about this Update - I am currently on the Latest Version of WordPress however: [https://make.wordpress.org/core/2019/10/11/updates-to-image-processing-in-wordpress-5-3/]
For months I have been talking to support teams and Developers before finding this article above. - Unfortunately I have had no luck with any ideas or information from them until finding this Post.
Since November 2019 (The first content I have added since the 5.3 Update) I have had an issue with Uploading Images.
For example I will upload an image at 250x250 pixels. However when it is displayed on the page the ""Intrinsic Sizing"" will be 624x468.
Inside of the Media Library it still says the dimensions are ""250x250"" however Right Clicking the Image > Open Image In New Tab - Displays the image at 624 x 468. - Its creating different sizings and now choosing the wrong one (e.g - not picking Original Dimensions)
I want to note. T**his is only for images uploaded SINCE this 5.3 Update**.
I can still insert previously uploaded images that are stored in the Media Library and they are the correct Dimensions on the page.
Attached Image Below showing:
[[Image(https://gmm-downloads.s3.amazonaws.com/WordPress+5.3+Intrinsic+Sizing.JPG)]]
I have disabled Themes and Plugins and the Issue still occurs.
**Note:** ''I am having this issue only on my LIVE site. My Development site with the same themes and Plugins does not get this error - so it was potentially a problem on Installing the update?''
From the timing and what the 5.3 Update included, I feel as though it is related to this 5.3 update.
Thanks!
Alex
**P.S** This is my first WordPress.org post - So I apologize if I am in the wrong area for posting this kind of question. Have a great day :)",techgmm
Candidates for Closure,58944,Upload to Media Library not replicating to all pod's 6.2.2,,Media,6.2.2,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2023-07-31T10:18:52Z,2023-10-04T15:34:54Z,"Hello, after updating from WP 6.1.1 to 6.2.2 the new uploaded images start to apear ""broken"" on Media Library. If we refresh the page several time's we will see the image ok, but if we refresh it again it will be broken. We are running the WP in kubernetes, so we have several pod's. This behaviour means the uploaded image is no longer been replicated to all pod's. So it only exist's in one pod.
After reverting to 6.1.1 all is ok.",vitorgandra
Candidates for Closure,44765,Uploaded image corrupted after resizing,,Media,4.9.8,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2018-08-09T13:49:17Z,2021-04-28T18:00:00Z,"When I upload .jpg larger image and turn on resizing, image is corrupted after upload is done. I tried it on two websites on latest version. In v. 4.9.6 its working normally. When i Set in SETTINGS - MEDIA zeroes everywhere, its not resizing and picture is fine. Screenshots are below:
[[Image(https://ctrlv.cz/shots/2018/08/09/lnGX.png)]]
[[Image(https://ctrlv.cz/shots/2018/08/09/t6CU.png)]]
[[Image(https://ctrlv.cz/shots/2018/08/09/bb0t.png)]]",lurbanek
Candidates for Closure,50909,WordPress 5.5 update adds height and width attributes to images,,Media,5.5,normal,normal,Awaiting Review,defect (bug),new,close,2020-08-11T22:02:56Z,2020-10-30T14:33:28Z,"It appears that some images added with the gutenberg editor (no updates since June) now have height and width attributes being dynamically added following the new loading attribute.
I updated locally only so far.
This is the previous img element being displayed in the browser:
{{{
}}}
This is it now:
{{{
}}}
These are the new attributes being added:
{{{
loading=""lazy"" width=""1000"" height=""448""
}}}
",jeslen
Candidates for Closure,48988,WordPress Does Not Generate JPG Sizes After 5.3.1,,Media,5.3.1,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2019-12-15T12:23:16Z,2020-03-12T15:32:41Z,"I have a strange problem on all my wordpress sites after upgrading to 5.3.1
When uploading an image to the site, it does not create any additional size nor the thumb 375x175 it should create ... I've tried using plugins that generate image sizes and they didn't work either ...
The strange thing is that if the image is PNG it does create the other sizes, the error happens only with JPG images. Even if I rename a JPG image to PNG the process doesn't work ...
Remembering that wordpress uploads the image normally, it just doesn't generate the extra JPG sizes, absolutely no additional sizes.
",kevinbkt10
Candidates for Closure,51908,add_image_size not working with custom plugin code,,Media,,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-12-01T17:55:45Z,2020-12-02T12:30:10Z,"Hey,
add_image_size() not working within the custom plugin code that we can change the the_post_thumbnail() with any custom size.
Thanks,
Arpit G Shah",arpitgshah
Candidates for Closure,41816,attachment_url_to_postid() should find post_id for URLs of intermediate size images,,Media,4.9,normal,normal,Awaiting Review,defect (bug),new,dev-feedback,2017-09-06T15:40:45Z,2021-09-28T21:06:56Z,"[[https://developer.wordpress.org/reference/functions/attachment_url_to_postid/|attachment_url_to_postid()]] fails to find the post ID when given a URL of an intermediate sized image.
For example,
{{{
$url_of_full_sized_image = 'http://example.com/wp-content/uploads/test.jpg';
$attachment_id = attachment_url_to_postid( $url_of_full_sized_image );
// $attachment_id now equals 3
$url_of_intermediate_sized_image = 'http://example.com/wp-content/uploads/test-150x150.jpg';
$attachment_id = attachment_url_to_postid( $url_of_intermediate_sized_image );
// $attachment_id now equals 0 but should equal 3, the same as for the full-sized image
}}}
This should be fixed.",pbiron
Candidates for Closure,54943,"image_get_intermediate_size(): size data is a bool, not an array throws notice / warning",,Media,5.9,normal,normal,Awaiting Review,defect (bug),new,needs-unit-tests,2022-01-27T08:03:50Z,2023-08-07T19:20:26Z,"While testing my website on PHP 8.0 (in my example opening the blog page), I noticed the following two warnings in the error log:
{{{
[27-Jan-2022 08:56:34] WARNING: [pool xxx] child 1031078 said into stderr: ""PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/xxx/wp-includes/media.php on line 779""
[27-Jan-2022 08:56:34] WARNING: [pool xxx] child 1031078 said into stderr: ""PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/xxx/wp-includes/media.php on line 785""
}}}
PHP 7.4 throws a Notice.
I also noticed with a fresh install of wordpress. ",fhwebdesign
Candidates for Closure,51667,php notices in logs,,Media,5.5.1,normal,minor,Awaiting Review,defect (bug),new,reporter-feedback,2020-10-29T19:45:40Z,2023-10-25T05:53:48Z,"On php 7.4 I receive php notices in the error log. Not really sure if its a theme problem or problem with the media.php. Just reporting in case its something that should be addressed. But my log is riddled full of these. Maybe add a check to see if the parameter is actually an array first?
[29-Oct-2020 19:20:36 UTC] PHP Notice: Trying to access array offset on value of type bool in wp-includes/media.php on line 782
[29-Oct-2020 19:20:36 UTC] PHP Notice: Trying to access array offset on value of type bool in wp-includes/media.php on line 788
[28-Oct-2020 23:11:32 UTC] PHP Notice: Trying to access array offset on value of type bool in wp-includes/media.php on line 781
[28-Oct-2020 23:11:32 UTC] PHP Notice: Trying to access array offset on value of type bool in wp-includes/media.php on line 787",lsamins
Candidates for Closure,58261,"set_post_thumbnail_size interferes with ""Cover Image Block""",,Media,6.2,normal,normal,Awaiting Review,defect (bug),new,close,2023-05-05T15:42:51Z,2023-06-28T19:23:01Z,"adding a post thumbnail size on the theme level interferes with the Cover Image Block which will use the ""new thumbnail"" as its image, resulting in blurry image displays:
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( xxx, 9999 );",RichWP - Felix
Candidates for Closure,40688,there is a bug in deleting a photo and replacing it by the new photo with the same name,,Media,4.7.4,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2017-05-07T21:04:41Z,2023-06-06T09:45:05Z,there is a bug when you want to permanently delete some photo from library and replace some other one with the same name in library. when you do this the first photo in web page wont be changed i mean the first photo still appears on the web page so you should change the name of the new photo for uploading it and showing it instead of the older one. ,Navid.abazari
Candidates for Closure,50944,wp_calculate_image_srcset can unintentionally include unscaled original image,,Media,4.4,normal,normal,Awaiting Review,defect (bug),new,dev-feedback,2020-08-12T14:08:33Z,2020-08-24T21:33:22Z,"In `wp-includes/media.php`, `wp_calculate_image_srcset` seems to add the original image to the srcset string if the width is smaller than `$max_srcset_image_width` and if the image isn't a GIF. This isn't desirable since the original image is uncompressed and I don't even think it's intentional.
This behavior seems to have been introduced in this patch: https://core.trac.wordpress.org/changeset/35561. From what I can tell, the if statement should read like this:
{{{#!php
if ( ! isset( $image_sizes['thumbnail']['mime-type'] ) || 'image/gif' === $image_sizes['thumbnail']['mime-type'] ) {
}}}
The current code will include the original image whenever the thumbnail IS NOT a GIF. This seems to be opposite to the desired behavior?
",fredrikll
Candidates for Closure,49841,wp_get_attachment_url does not return a url,,Media,5.4,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-04-07T17:29:44Z,2020-06-02T16:49:34Z,"wp_get_attachment_url returns the base url to the uploads directory suffix with the file path.
The file path is not always a valid url. 'fun image.png' is a valid file name. It's url path is 'fun%20image.png'
I suggest adding the below straight after line 5859 in wp-includes/post.php
{{{
// Convert the file path into a valid URL path
$file = implode('/', array_map('rawurlencode', explode(DIRECTORY_SEPARATOR, $file)));
}}}
",hughie.molloy
Candidates for Closure,50264,wp_get_image_editor()->multi_resize() occasionally fails,,Media,5.4.1,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-05-27T12:26:21Z,2022-03-16T18:56:30Z,"I'm using wp_get_image_editor to create different sizes of same image, in 99.9% it works fine, but sometimes happens this:
[[Image(http://files.dangerd.org/pub/!PUBLIC//wpbug2.png)]]
All images are generated with smallest size in array, any ideas?
{{{#!php
resize( 1920, 1282, false );
$image->set_quality(65);
$image->save( $path );
$sizes = array(
array('width'=>640,'height'=>480,'crop'=>false),
array('width'=>640,'height'=>480,'crop'=>true),
array('width'=>150,'height'=>150,'crop'=>true),
);
$mult = $image->multi_resize( $sizes );
}}}
",dangerd512
Tickets Needing Feedback,45407,Add block attributes to `wp_calculate_image_sizes` to allow for proper handling of `sizes` attribute,joemcgill,Media,,high,major,Future Release,defect (bug),assigned,dev-feedback,2018-11-23T23:17:04Z,2022-02-03T15:13:41Z,"Related Gutenberg issues:
- 6177 https://github.com/WordPress/gutenberg/issues/6177
- 6131 https://github.com/WordPress/gutenberg/issues/6131
- 11973 (PR) https://github.com/WordPress/gutenberg/pull/11973
Related Trac tickets:
- #45406
- #37840
== Problem
For images with no alignment or images where the image block is aligned `alignwide` and `alignfull`, the `sizes` attribute reads:
{{{
sizes=""(max-width: 1024px) 100vw, 1024px""
}}}
This means regardless of the displayed width of an image, the largest image file pulled by the browser is the generated 1024px image. If the displayed image width is wider than 1024px, the browser will stretch the image to compensate causing blur and artifacts.
Historically this was solved by theme developers by augmenting the `sizes` attribute using the `wp_calculate_image_sizes` filter.
The new `alignwide` and `alignfull` widths **cannot currently be accommodated** using this filter because the filter does not contain information about the alignment value of the containing block.
== Proposed solution
Modify the `wp_calculate_image_sizes` filter to include a new fifth parameter `$block_attr` containing an array which includes `[align]` which holds the alignment value for the containing block.
This is a stop-gap measure as we wait for Gutenberg PR 11973 https://github.com/WordPress/gutenberg/pull/11973 to merge.
== Why this is a blocker
From my perspective, this is a blocker to 5.0 for three main reasons:
1. As stated earlier, the current implementation of images means images with no alignment or images where the image block is aligned `alignwide` and `alignfull` are supplied with an incorrect `sizes` attribute by core. Theme developers cannot fix this because they have no way of filtering for different block widths. The end result is the visitor experiences blurry and/or artifact-heavy images which will be interpreted as an error. No theme (Twenty Nineteen included) handles responsive images correctly at the moment meaning all ""Gutenberg-ready"" themes with wide and full image options will display blurry/artifact-full images.
2. A solution to this problem must be one which stands the test of time. Once a solution is introduced, every theme (including core themes) must be updated. Shipping an interim solution which will later be changed puts an undue burden on theme developers and will impose legacy debt on WordPress Core to provide support for the interim solution in the long term. The proposal to add `$block_attr` with the `[width]` value to the `wp_calculate_image_sizes` filter is a mini version of what is proposed in Gutenberg PR 11973 and will be forward-compatible to more advanced images handling by themes.
3. 5.0 is shipping to millions of sites world wide. WordPress has a responsibility to follow web standards and use them correctly. The current implementation of the `sizes` attribute is insufficient and causes incorrect behavior for the end-user.
== Further context
- https://github.com/WordPress/twentynineteen/issues/50#issuecomment-436829300
- https://github.com/WordPress/gutenberg/issues/6177#issuecomment-400095305
- https://github.com/WordPress/twentynineteen/pull/629/files",mor10
Tickets Needing Feedback,23779,Can't insert large image if it's smaller than media setting but larger than theme setting,,Media,3.0,normal,normal,,defect (bug),new,dev-feedback,2013-03-15T00:47:08Z,2019-06-04T20:05:06Z,"If you upload an image that is larger than $content_width but not larger than the ""large"" setting in settings->media, the option to insert a ""large"" image into the post isn't available even though the image is large enough.
It looks like it must use $content_width as the actual width of the large image that's inserted, and the large_size_w setting to decide whether to show that option or not.",aaroncampbell
Tickets Needing Feedback,40921,Detect and Handle MP4 and OGG audio files properly,,Media,3.6,normal,normal,Future Release,defect (bug),assigned,reporter-feedback,2017-06-04T20:14:25Z,2022-01-30T16:51:13Z,"The audio media widget does not render the audio player when displaying the widget on the front-end when an mp4 file is referenced; it is rendered (and plays) as expected in the admin screens.
This behaviour is the same whether using the wp-core-media-widget plugin or built-in widgets in 4.8.
Attaching a gif (hope these are OK).
",toddhalfpenny
Tickets Needing Feedback,52777,Editing an empty gallery results in a javascript error,,Media,,normal,normal,Future Release,defect (bug),new,reporter-feedback,2021-03-11T13:22:38Z,2023-01-31T13:07:44Z,"How to reproduce?
1. In the **classic** editor, create a post with a gallery with one image and save the post.
2. Go to the media library and delete permanently this image.
3. Go back editing the previous post. The gallery displays ""No items found"".
4. Attempt to edit the gallery and check the browser console.
Here is the error displayed:
{{{
Uncaught TypeError: Cannot read property 'args' of undefined
at n.
(media-views.min.js?ver=5.8-alpha-50521:2)
at f (underscore.min.js?ver=1.8.3:2)
}}}
and the trace:
{{{
(anonymous) @ media-views.min.js?ver=5.8-alpha-50521:2
f @ underscore.min.js?ver=1.8.3:2
setTimeout (async)
(anonymous) @ underscore.min.js?ver=1.8.3:2
p @ backbone.min.js?ver=1.4.0:2
f @ backbone.min.js?ver=1.4.0:2
c @ backbone.min.js?ver=1.4.0:2
n.trigger @ backbone.min.js?ver=1.4.0:2
(anonymous) @ media-models.min.js?…r=5.8-alpha-50521:2
c @ load-scripts.php?c=0…r=5.8-alpha-50521:2
fireWith @ load-scripts.php?c=0…r=5.8-alpha-50521:2
(anonymous) @ wp-util.min.js?ver=5.8-alpha-50521:2
c @ load-scripts.php?c=0…r=5.8-alpha-50521:2
fireWith @ load-scripts.php?c=0…r=5.8-alpha-50521:2
l @ load-scripts.php?c=0…r=5.8-alpha-50521:2
(anonymous) @ load-scripts.php?c=0…r=5.8-alpha-50521:2
load (async)
send @ load-scripts.php?c=0…r=5.8-alpha-50521:2
ajax @ load-scripts.php?c=0…r=5.8-alpha-50521:2
s.ajax.s.ajax @ load-scripts.php?c=0…r=5.8-alpha-50521:5
(anonymous) @ wp-util.min.js?ver=5.8-alpha-50521:2
s.Deferred.s.Deferred @ load-scripts.php?c=0…r=5.8-alpha-50521:5
send @ wp-util.min.js?ver=5.8-alpha-50521:2
sync @ media-models.min.js?…r=5.8-alpha-50521:2
fetch @ backbone.min.js?ver=1.4.0:2
more @ media-models.min.js?…r=5.8-alpha-50521:2
more @ media-models.min.js?…r=5.8-alpha-50521:2
edit @ media-editor.min.js?…r=5.8-alpha-50521:2
edit @ mce-view.min.js?ver=5.8-alpha-50521:2
edit @ mce-view.min.js?ver=5.8-alpha-50521:2
onclick @ plugin.min.js?wp-mce-49110-20201110:1
c.fire @ tinymce.min.js?ver=49110-20201110:2
fire @ theme.min.js?wp-mce-49110-20201110:1
o @ theme.min.js?wp-mce-49110-20201110:1
C @ tinymce.min.js?ver=49110-20201110:2
d @ tinymce.min.js?ver=49110-20201110:2
}}}
",Chouby
Tickets Needing Feedback,47545,Getting undefined wp.media.frame.state() after click on featured image preview,antpb,Media,5.2.1,normal,normal,Future Release,defect (bug),assigned,reporter-feedback,2019-06-15T13:29:15Z,2023-02-26T04:43:26Z,"
In WP 5.x:
- When I click on the featured image preview the wp.media.frame.state().get('selection') is undefined.
- But, when I click on the ""Replace image"" button wp.media.frame.state().get('selection') returns the selected attachment object (which is the expected behaviour).
While in WP 4.x it returns correctly the attachment when I click on the featured image preview.
",nlemsieh
Tickets Needing Feedback,32750,"If changing the checkbox state ""organize my uploads..."" in the media preferences the thumbnails aren't shown anymore",,Media,4.2.2,normal,normal,,defect (bug),new,reporter-feedback,2015-06-22T12:20:45Z,2019-06-04T20:14:31Z,"Hi i ran into the following issue on WordPress 4.2.2. The steps to reproduce.
1. Inside the media preferences keep the checkbox ""Organize my uploads into month- and year-based folders"" unchecked.
2. Upload one or two images inside the library -> everything is previewed properly in thumbnails as well as all files are properly uploaded when checked via ftp.
3. Now check the ""Organize my uploads into month- and year-based folders"" checkbox.
4. Drag and drop a new image to upload inside the library.
5. The thumbnails for the images aren't shown in the library. You only see questionmark placeholders.
6. But if you check via ftp the source files are actually there inside the designated yearly and monthy subfolders but as mentioned not shown in the library.
7. if you uncheck the checkbox in the media preferences again and upload a new image everything works out again and the previews are shown again.
Cheers r. ",rkoller
Tickets Needing Feedback,31570,Infinite loop when filtering Media Library images by size in a modal (using wp_prepare_attachment_for_js),fuhton,Media,4.1.1,normal,normal,,defect (bug),assigned,dev-feedback,2015-03-09T13:48:25Z,2019-06-04T20:11:46Z,"In an attempt to restrict a post's Featured Image dimensions to imagers wider than 100px I implement the following code in `functions.php`:
{{{
function restrict_media_library_by_width($response, $attachment, $meta) {
if(isset($response['width']) && isset($response['height']) && $response['width'] > 100) {
return $response;
}
return false;
}
add_filter('wp_prepare_attachment_for_js', 'restrict_media_library_by_width', 10, 3);
}}}
I then click ""Set featured image"" and the Media Library modal that appears only loads one empty thumbnail and my Network panel in Chrome Dev Tools reveals it makes continued, repeated, infinite AJAX requests.
The only viable alternative I've found was to run a separate query within `ajax_query_attachments_args`, which is needed because the `_wp_attachment_metadata` key contains serialized data and that leaves no way to compare dimensions within a `meta_query`.
Obviously running this additional query is inefficient and more resource intensive than it should be. More details here: http://wordpress.stackexchange.com/questions/180500/filter-media-library-items-by-size/.",silb3r
Tickets Needing Feedback,23398,"Media Gallery - Clicking ""Restore Original Image"" in ""Scale Image"" pane loses 'Thumbnail Settings' pane.",,Media,3.4,normal,normal,,defect (bug),new,dev-feedback,2013-02-05T21:11:36Z,2019-06-04T20:04:54Z,"Reproduce the problem thusly:
Click ""Edit image"" in the ""Edit Media"" interface for any image.
`/wp-admin/post.php?post=1119&action=edit`
Scale the image a couple times in the 'Scale Image' pane. Update.
Click ""Restore Original Image"" in the 'Scale Image' pane.
Try to crop just the thumbnail.
The 'Thumbnail Settings' Pane is '''''gone'''''.
The image has to be deleted and re-uploaded to gain thumbnail control once again.",gr33nman
Tickets Needing Feedback,50866,Media Uploader Blows Up File Sizes,antpb,Media,5.4.2,normal,major,Future Release,defect (bug),assigned,dev-feedback,2020-08-06T03:06:49Z,2022-04-27T05:49:21Z,"Dear Developers,
this is a flaw in the media uploader that is very simple to reproduce:
create a 512x512 PNG image with best compression,
make sure that your wordpress is set to create small, medium, and large versions of that image,
set one of those versions to be also 512x512px, so when you upload a 512x512px image the media manager will create a copy of that image with the same size.
upload the image.
wordpress's uploader will not use the original 512x512px PNG image when this size is requested by a page, but instead it will use its own 512x512px image that it has created, and
compare sizes - the media uploader's PNG image file is at least 3x-4x times bigger, and wordpress will use that bigger image file instead of the smaller original of the same dimensions, and better compression.
Please, could you fix that?
Thank you",hvar
Tickets Needing Feedback,29458,No longer able to catch click event of dashicons edit/delete,,Media,3.9,normal,normal,,defect (bug),new,reporter-feedback,2014-09-01T19:55:53Z,2019-06-04T20:08:56Z,"In WP4 RC it's no longer possible to catch the dashicons edit button click through the tinyMCE onclick event.
For example:
{{{
tinymce.activeEditor.on('click', function() {alert('clicked')} )
}}}
Never alerts. Is there a reason something's doing preventdefault or preventBubble? 3.9 was not affected by this. Are all shortcodes now '''required''' to do wp.mce.views.register(shortcodename, object) and include edit: function in the object?
Related: (#28169)",programmin
Tickets Needing Feedback,35092,Remove crop check in wp_prepare_attachment_for_js() for sizes,joemcgill,Media,3.5,normal,normal,,defect (bug),reviewing,reporter-feedback,2015-12-15T02:20:36Z,2019-06-04T20:20:01Z,Currently only cropped images generated on the fly are displayed. This due to a {{{! $downsize[3] }}} check. This change was made in #22598 and with the patch supplied I deleted this check. then medium/large does show up.,markoheijnen
Tickets Needing Feedback,36477,Responsive images (srcset) can include images larger than the full size,,Media,4.4.2,normal,normal,Future Release,defect (bug),assigned,needs-unit-tests,2016-04-11T13:27:58Z,2023-09-01T15:35:00Z,"In many cases, I saw the resized and smaller images are much larger than the origin image, especially for the optimized images, it will make no sense to do that resize in this case, the worst case I've seen is about 13x larger than the origin and bigger image.
If an example can help to explain the problem, please take this picture:
https://cdn2.peterdavehello.org/wp-content/uploads/2016/04/status.png
Many thanks!",peterdavehello
Tickets Needing Feedback,35837,The auto-update in media editor rewrites user inputs,,Media,4.4.2,normal,normal,,defect (bug),new,reporter-feedback,2016-02-15T13:04:34Z,2019-06-04T20:22:32Z,"Hello
while the media editor is opened in ""lightbox"" where the auto-upade is applied the input fields loose their focus on each autoupade making the editing really uncomfortable.
see this video
https://youtu.be/ULmiAf2N6kA
all the fields that you can see in this video were hooked up like so:
https://gist.github.com/twentyfortysix/d7dcdc931aed3f2529a9#file-register_media_field-php",o----o
Tickets Needing Feedback,45694,Undefined Index: caption_id,SergeyBiryukov,Media,5.0.1,normal,normal,Future Release,defect (bug),reviewing,reporter-feedback,2018-12-18T21:41:16Z,2019-01-16T05:56:42Z,"Discovered this randomly on a local project.
{{{
Notice: Undefined index: caption_id in /var/www/html/wp-includes/media.php on line 1572
}}}
Discovered with PHP 7.2.10 and WordPress 5.0.1
It's just a warning but one nonetheless.
Attached will be the patch.",Soben
Tickets Needing Feedback,36789,Upload Folder Bug,,Media,4.5,normal,normal,,defect (bug),new,reporter-feedback,2016-05-09T10:46:03Z,2019-06-04T20:24:40Z,"Affected Version 4.5.x
If changing the upload folder path in wp-config.php (define( 'UPLOADS', 'media' );) - no image will work after update to 4.5.x, because the url path structure changes in the sourcecode.
for example:
",netzilicious
Tickets Needing Feedback,23562,Using Speech Recognition Software with the Add Media Panel,joedolson*,Media,3.5.1,normal,normal,Future Release,defect (bug),accepted,reporter-feedback,2013-02-20T16:06:02Z,2023-08-24T13:36:57Z,"Linked to #23560 this ticket specifically concerns the speech recognition user's accessibility experience of the Add Media functionality.
I'm using Dragon Naturally Speaking with IE9 on Windows 7 - a typical setup as Dragon works best with IE.
Within the Edit Post screen I can use Dragon to action the Add Media link successfully. The command in Dragon for such an action is ""Click Add Media"". This works, but then I run into the following problem:
* With the exception of Set Featured Image, none of the other links on the panel appear to be directly accessible with Dragon.
* If I select Set Featured Image I can't action any of the other links.
Dragon users can use voice commands to replicate pressing the tab key. The experience then mirrors that outlined in #23560 - but of course this cannot be used to select the images or other files.
It is possible for Dragon users to interact with screens using mouse commands but it is an incredibly laborious and time consuming process - used only as a last resort.
If one of the images is selected, the information panel for that images opens to the right. Unfortunately none of the input fields (for title, alt, etc) are directly available to Dragon. Ironically, the Insert Into Post button can be accessed directly with a voice command.
Some investigation needs to be done as to why most of the links and input fields cannot be directly accessed by Dragon when the panel is opened. This is a parallel with the situation on the Theme Customizer panel.
It is interesting that the Set Featured Image link and the Insert Into Post button '''can''' be directly accessed. What is different about them?
",grahamarmfield
Tickets Needing Feedback,33337,WordPress crashes in Chrome when trying to upload images too quickly into Media Library,,Media,4.3,normal,major,,defect (bug),new,reporter-feedback,2015-08-11T10:30:58Z,2019-06-04T20:15:30Z,"Steps to reproduce
1) Use Chrome and a wordpress installation with at least few images, the more images, the easier to reproduce.
2) Create new post
3) Click Add Media
4) Whilst the Media Library is loading all of the images, try to drag new images into the window to upload.
The result is that Chrome crashes. It seems as though the trying to drag images into the window before the ""Drag to upload"" function is loaded kills it.
",tstania
Tickets Needing Feedback,43046,`has_image_size()` returns false for Core image sizes,,Media,3.9,normal,minor,Future Release,defect (bug),assigned,dev-feedback,2018-01-08T21:37:31Z,2020-02-21T17:52:25Z,"`has_image_size()` returns `false` (does not exist) for the four core image sizes (thumbnail, medium, medium_large, large).
`get_intermediate_image_sizes()` returns these core image sizes merged with custom registered sizes through `add_image_size()`.
`has_image_size()` should return true for the core image sizes, or the function docs should note that the core image sizes are not checked in the function.",desrosj
Tickets Needing Feedback,49601,layout width bugfix for img_caption_shortcode(),,Media,5.4,normal,normal,,defect (bug),reopened,dev-feedback,2020-03-08T19:00:36Z,2022-10-13T21:01:21Z,"`img_caption_shortcode()` in `wp-includes/media.php` is hardcoding an inline `style=""width:""` attribute on the outer `` or `` element that contains the image and image caption, which it sets to the pixel width of the image. This is so the image caption is the same width as the image.
The problem is that on mobile (narrow width) layouts this hardcoded figure/div element width will cause the entire container element to expand to this width, which makes the entire main content column overflow the window/viewport, so the page content overflows the screen and can't be read. Google search console also flags this issue. Here's what it looks like:
Normally in CSS, themes have something simple like `img { max-width: 100%; }` to prevent images from overflowing the container element. But since WordPress is hardcoding the element width with an inline style, this takes precedence and clobbers whatever in in CSS. So it is not possible for a theme to fix this issue.
The fix is simple, just use `max-width` instead of `width`. The caption text still stretches to whatever the width of the image is, but the element no longer overflows the page. Patch is attached but all it is doing is using `max-width instead of `width`.",joelhardi
Tickets Needing Feedback,41445,post_parent can prevent media from embedding correctly,adamsilverstein,Media,4.9.4,normal,normal,Future Release,defect (bug),reopened,needs-unit-tests,2017-07-26T06:29:28Z,2024-01-26T07:46:47Z,"If media is uploaded for a post, then used as a featured image on another post, and the original parent is not accessible via the REST API (e.g. because it's in the trash, not published etc), then it cannot be embedded on the post that ''is'' accessible.
To reproduce
* make a new post with a featured image
* trash the post
* make a new post, using the first image as the featured image
* request the second post over the rest API with media embedding enabled
The media will not be embedded, instead a forbidden result will be embedded error
{{{#!json
{
""wp:featuredmedia"":[
{
""code"":""rest_forbidden"",
""message"":""You don't have permission to do this."",
""data"":{
""status"":403
}
}
]
}
}}}
See https://github.com/WP-API/WP-API/issues/2596 for the original issue. Also related is https://core.trac.wordpress.org/ticket/30691.
",loboyle
Tickets Needing Feedback,35648,the_post_thumbnail sets srcset with http protocol,,Media,4.4,normal,normal,,defect (bug),new,reporter-feedback,2016-01-28T16:28:48Z,2019-06-04T20:21:48Z,"We have a wordpress site that uses https always, when we use the_post_thumbnail, it returns HTTPS for the SRC attribute but it returns HTTP values for the SRCSET attribute. This is not a duplicate of #28261 or #15928 because this only happens on the srcset attribute.
We had to do this filter in order to do a quick patch:
{{{#!php
do_items(false, 1);
return $this->done;
}
}}}
Indeed style elements are allowed in the body in HTML5, provided it is a '''style''' element - not link element - and provided it has the scoped attribute. See http://www.w3.org/TR/2011/WD-html5-author-20110705/the-style-element.html#the-style-element
Here are the medialements genetared tags in the body:
{{{
}}}
But this breaks W3C's HTML5 validation.
According to http://www.w3.org/TR/2011/WD-html5-author-20110705/the-link-element.html :
Link elements must be used in metadata content.
According to http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-link-element :
If the rel attribute is used, the element is restricted to the head element. When used with the itemprop attribute, the element can be used both in the head element and in the body of the page, subject to the constraints of the microdata model.
",AlphaK
Tickets with Patches,31029,Allow 0 columns in gallery settings,rhurling,Media,4.1,normal,normal,,defect (bug),assigned,has-patch,2015-01-15T23:02:38Z,2022-10-26T19:47:56Z,"Gallery columns ""0"" is a valid setting and correctly outputs a proper CSS class
`class=""gallery galleryid-43 gallery-columns-0 gallery-size-thumbnail"">`
Using that CSS class, as a theme author, I could easily build, for example, a grid layout with items displayed inline (or whatever layout other than ""columns""), overriding just a very few CSS rules.
I could set `columns=""0""` manually, however, each time I'd edit the gallery settings through the media views UI, `columns=""0""` would be removed and it would fallback to the default 3 columns.
[[Image(https://cldup.com/7zoOccOC1H.png)]]
I would propose to add and allow a ""none"" columns setting, with value ""0"".
P.S. just noticed: same if I want to add a value higher than ""9"". Setting an arbitrary limit to ""9"" is an assumption that, as developers, we shouldn't do. What if I want, say, 10 images per row?",afercia
Tickets with Patches,43119,Allow passing empty post ID to media_handle_sideload(),,Media,2.6,normal,normal,Future Release,defect (bug),new,has-patch,2018-01-17T20:56:38Z,2021-09-01T10:16:11Z,"I stumbled upon this via https://wordpress.stackexchange.com/questions/291344/why-does-media-handle-sideload-upload-to-last-months-folder.
Basically, the person was trying to run `media_handle_sideload( $file_array, $post_id = 0 )` to upload files. This works fine in so far as it calls `wp_insert_attachment()` which accepts a post ID of `0` (it's the default) so the attachment won't be associated with a specific post.
However, `media_handle_sideload()` doesn't fully support `$post_id = 0` (or `$post_id = null`, for that matter) because of the `if ( $post = get_post( $post_id ) ) { … }` condition since `get_post( 0 )` fetches the global post and overrides `$time`.
This means you cannot upload a media file and have `$time` set to today.
To reproduce:
1. Create a post with the date set to last month
1. Set this post as `$GLOBALS['post']`
1. Run `media_handle_sideload( $file_array, 0 )`
1. Notice that the upload folder will be the one from last month, not this month.
Proposed fix:
Change the condition from `if ( $post = get_post( $post_id ) ) { … }` to `if ( $post_id && $post = get_post( $post_id ) ) { … }`
Consequences:
The upload folder will point to the current month, not the date from the global post if using `$post_id = 0` or `$post_id = null`. Not a big deal IMHO.",swissspidy
Tickets with Patches,44790,Attachment Overlay does not trigger spinner for compat fields,,Media,,normal,normal,Future Release,defect (bug),new,close,2018-08-14T08:03:53Z,2023-10-19T18:35:25Z,"we are using ACF and some other custom fields in the attachment library, when we change values of those ""compat"" fields - the spinner/loader does not show up, which leads to the situation that the editor/user, may think everything is saved, and clicks assign/close to the overlay, and behind the overlay he/she may click on publish, which in some situations cancels the XHR requests and leads to data loss.
i have prepared a patch, not 100% sure if it is in the right place, let me know if you'd want me to adopt/change anything.",hjanuschka
Tickets with Patches,48489,Big image size threshold should take into account registered image sizes.,,Media,5.3,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2019-11-03T20:22:54Z,2023-11-16T11:42:00Z,"The ""big image"" upper size threshold is set to `2560`. If an image size is registered that has a width or height larger than this, then the image will be unexpectedly cropped to `2560`.
The value that gets passed through to the `big_image_size_threshold` filter should be set to the maximum value of either `2560` or the largest width or height from all registered image sizes.
",johnbillion
Tickets with Patches,39883,Code hooking on `image_downsize` can no longer assume the file is an image,joemcgill,Media,4.7,normal,normal,Future Release,defect (bug),assigned,dev-feedback,2017-02-15T19:52:34Z,2017-05-23T20:29:02Z,"In r38949, Core pretty drastically changed the expectations that any code hooking onto the `image_downsize` filter could make until then, potentially leading to issues for integrators.
We went from having the `image_downsize()` function immediately return `false` if a file wasn't an image, not getting to that filter application at all, to only setting a variable with the result of the `wp_attachment_is_image( $id )` test and now applying the filter (not even passing said result, for that matter).
This was a pretty big safe assumption to take away from under integrators' feet.
Coupled to this, a wise integrator that might have picked up on this change could have wanted to have its own code have `image_downsize()` still returning `false` if it does not want to have the file further processed by the function, but there is no opportunity to, since returning `false` will cause `image_downsize()` to keep on with its processing instead of proceeding with `return $out`.
Returning anything but false or null will cause `image_downsize()` to return, but that might not always be desirable to preserve the way WP worked prior to 4.7.
What's better here for general use isn't as clear cut as what r38949 made it to be. I've discussed the case with @mikeschroder, and we've agreed to open this ticket so we can further discuss what should be done, if anything.",stephdau
Tickets with Patches,44641,Customizing Button Text in Custom Media Manager Frame Doesn't Work Anymore,antpb,Media,4.9.7,normal,normal,Future Release,defect (bug),assigned,dev-feedback,2018-07-25T12:16:47Z,2022-01-30T16:52:29Z,"= Summary
I have a plugin that calls up the Media Manager. I use the ""gallery"" state, and customize the main button text via the `wp.media` arguments. I've noticed a regression. The text in the primary button is no longer overridden by the arguments that I pass.
= What I'm Doing (Code is simplified)
{{{
var file_frame = wp.media.frame = wp.media({
frame: 'post',
state: 'gallery',
library : { type : 'image'},
button: {text: 'Edit Image Order'}, // <----- LINE IN QUESTION
multiple: true
});
file_frame.open();
}}}
= What Should Happen
The text inside the primary button in the media manager modal should change from ""Create a new Gallery"" to ""Edit Image Order"".
[[Image(https://imgur.com/faJevb7)]]
= What Actually Happens
The button ignores my arguments and retains its default text.
[[Image(https://imgur.com/6gLdtLv)]]
",Kelderic
Tickets with Patches,32654,Denying upload_files cap makes Customizer and Media modal act oddly,wonderboymusic,Media,4.3,normal,normal,,defect (bug),assigned,has-patch,2015-06-15T17:40:05Z,2019-06-04T20:14:17Z,"This is an unusual one, so labeling it as an enhancement rather than a bug. Somebody more familiar with the Customizer classes and Media modal might know the right way to handle this properly.
If you disable the upload_files capability, with the intent of not allowing file uploads by anybody (duh), then the customizer acts very odd in the assorted image-related controls.
Example code:
{{{
add_filter('user_has_cap', 'no_file_uploads');
function no_file_uploads( $caps ) {
$caps['upload_files'] = false;
return $caps;
}
}}}
The ""Header Image"" section still has an ""Add New Image"" button, which gives you the Media Library popup, with a spinner that never stops spinning. Also, the Upload Files tab still exist.
The ""Background Image"" section has a Select Image button, with the same broken Media Library popup as the other one.
Expected behavior: Media chooser that works, no Upload Files tab.
This may be an issue both with the Customizer showing incorrect buttons, or which more properly belongs to the Media modal in that it should still be possible to select an image even if you cannot upload one.
Alternatively, disabling upload_files in this way may be the wrong way to do it, although it is the most obvious approach.
",Otto42
Tickets with Patches,34225,Display correct dimensions for image sizes in media modal,,Media,4.3.1,normal,normal,Future Release,defect (bug),new,has-patch,2015-10-08T22:08:36Z,2017-05-24T19:40:21Z,"In the media modal dropdown, the available image sizes and their dimensions are shown like this:
[[Image(https://cldup.com/fO5zZgC7OV.png)]]
But the image dimensions are actually larger. The shown values are restricted because of the theme's `$content_width` variable. The actual values are like this:
[[Image(https://cldup.com/DHFDDrEnlb.png)]]
This dropdown is for informational purposes only, and the actual image size should show, not the constrained dimensions that will be in the media markup (largely for TinyMCE / editor purposes I believe).
These image sizes are output to this modal template from `wp-includes/media-template.php`, and that data is setup from `wp_prepare_attachment_for_js`.
This function calls the `image_constrain_size_for_editor`, which has a fourth parameter for `context`. That parameter is set to be `edit` both here and by default, and therefore the image constraints are set to this dropdown, even though it is for informational purposes only.
Current contexts documented currently are `edit` or `display`. `edit` is the default if `is_admin()` returns true. There should be a third context, that does no constrain the image size, if the purpose for grabbing the image size is for informational purposes. Therefore, I think the best solution is to allow for a new `context` that I'm calling `info`.
The new context would override the `admin` context, but not override the width parameter on the inserted media (that's useful for editor/TinyMCE purposes), nor would it override anything on the front end. It just edits it for reference purposes in the dropdown, to prevent innaccurate information from being presented to the user.",krogsgard
Tickets with Patches,59760,Expand format support detection for `WP_Image_Editor_GD::supports_mime_type` to include AVIF,adamsilverstein,Media,,normal,normal,Future Release,defect (bug),assigned,has-patch,2023-10-28T00:07:57Z,2023-11-17T18:30:48Z,"Enable support for AVIF images when PHP's GD supports it.
Currently WordPress does not properly detect GD support for AVIF when available in PHP 8.1 and above.
Note that `WP_Image_Editor_Imagick::supports_mime_type` already detects AVIF support correctly.
",adamsilverstein
Tickets with Patches,26992,"Failing to make new yyyy/mm for uploads affects existing URLs (WP_CONTENT_URL, wp_get_attachment_url and GUID)",,Media,2.7,normal,normal,,defect (bug),new,has-patch,2014-02-02T17:53:13Z,2019-06-04T20:06:42Z,"What happens:
- I have the `WP_CONTENT_DIR` and `_URL` pointing somewhere, not where the WP is installed.
- There was an error creating upload folder `yyyy/mm` (permission issues)
- `wp_get_attachment_url()` could not go through the `if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] )` block and came to the ""not recommended to rely upon"" `$url = get_the_guid( $post->ID );`
The GUID returned completely ignored my settings. It started with the default `/wp-content/`. Obviously. Those attachments were made before I moved the wp-content, and nobody fixed the GUIDs.
Result: all images broken.
I believe, something has to be changed here, so '''when the upload directory for new attachments cannot be created, it won't affect the existing attachments'''.
----
Code Path:
`wp_get_attachment_image_src -> image_downsize -> wp_get_attachment_url`",tivnet
Tickets with Patches,39625,Give an error message when a non-image is uploaded for featured image,,Media,,normal,normal,Future Release,defect (bug),new,has-patch,2017-01-18T15:04:41Z,2023-06-07T15:22:53Z,"I was able to upload a video but it didn't error, it just didn't show. I feel we should give some feedback that this isn't supported. Yes, it doesn't add the video but it shouldn't just reshow the 'add' call. This is what you see after having seemingly gone through upload working - the video shows in media browser.
[[Image(https://cldup.com/272Cq89Sl0.png, 40%)]]",karmatosed
Tickets with Patches,27139,Image caption disappears if images are rearranged immediately after adding the caption.,,Media,3.5,normal,normal,,defect (bug),new,has-patch,2014-02-16T05:13:04Z,2021-02-09T04:52:37Z,"**Steps to reproduce (screencast here: http://youtu.be/MF2SEn_lMeQ):**
1. While editing a post, open the Add Media dialog.
1. Upload (or select) two images and choose ""Create Gallery.""
1. Click ""Create New Gallery"".
1. Add a caption to the first image in the text field underneath the image preview in the main ""Edit Gallery"" area.
1. Drag the second image so that it is reordered in front of the first image.
**What I expected:**
The images would be reordered and the image captions would not be changed.
**What actually happened:**
The images were reordered, but the image caption I had just entered reverted to its previous state.
Clicking in any other text field before reordering images seems to ""cement"" the caption, but you can click on multiple images before dragging an image, and the caption will still revert.",cfinke
Tickets with Patches,39647,"Make media upload ""HTTP error."" more user-helpful",,Media,3.4,normal,normal,Future Release,defect (bug),new,has-patch,2017-01-20T06:58:59Z,2019-09-25T16:18:14Z,"Since the introduction of the Media Gallery in WordPress 3.4, the error messages when users attempt to upload media have been reduced to a detail-less “HTTP error.”, without any suggestion as to how users can move forward, and limited information for users to be able to contact their hosts to get help.
This is user hostile, and not in line with many of the assertions in [https://wordpress.org/about/philosophy/ WordPress Philosophy].
There’s no doubt that error messages must exist, but they should be useful, providing next steps for users.
A few possible parts/steps of this:
- Retry
- Auto Retry
- Better error messages where possible (Timeout, Out of Memory, in user terms)
- Expand for Exact Details to give to host (or WP_DEBUG enables this?)
- Troubleshooting Steps, or link to troubleshooting steps
This should be possible to accomplish in stages, which will likely each need their own tickets.
One of the first steps for ""Retry"" is to make image upload/thumbnail creation able to be resumed, rather than only adding the meta after all sizes are created.",kirasong
Tickets with Patches,39968,Media Library: deleting all items on the last page loses the pagination/navigation buttons and shows message,antpb,Media,4.7.2,normal,normal,Future Release,defect (bug),reopened,has-patch,2017-02-26T14:10:59Z,2021-02-25T15:14:07Z,"While deleting all items on the last page of Media Library, the page loses the pagination/navigation buttons and shows the message ""No Media Files found"" with no way to access the earlier pages other than by going back to the ""Media"" link",donsony
Tickets with Patches,48236,Media attachment browser no longer provides id of attachment,,Media,5.2.3,normal,normal,Future Release,defect (bug),new,has-patch,2019-10-07T06:49:48Z,2020-02-21T01:39:38Z,"This is a follow-up to #47458.
Issue #47458 removed the data-id attribute from the media attachment browser. This was a useful attribute, used by an (internal) plugin on our site to access the details of the currently displayed attachment. We used code similar to this to hook into the dialog:
{{{
wp.media.view.Attachment.Details.prototype.on('ready', function() {
var postid = $('.attachment-details').data('id'),
details = wp.media.attachment(postid);
// do stuff with details
});
}}}
This functionality is now broken, and I can’t see another way to access the id of the attachment details being shown. (The item id in the query string is not reliable, as it’s not always updated in time, or at all.)
Could this useful attribute be restored? It doesn’t seem to affect the problem addressed in #47458 in any way.",slebog
Tickets with Patches,58730,"Media not getting removed from the media library popup after clicking ""Delete permanently"" button",,Media,6.3,normal,normal,Future Release,defect (bug),new,has-patch,2023-07-06T11:39:17Z,2024-02-05T20:19:12Z,"I encountered an issue while attempting to remove media from the Media Library popup in WordPress. Despite deleting the media file, it remains visible in the popup window, ideally the media should get removed automatically from the window once its deleted permanently.
1. Log in to the WordPress admin panel.
2. Navigate to the ""Posts"" section and select an existing post or create a new one.
3. Click on the ""Set featured image"" button within the post editor.
4. Try to delete a media from the window.
5. Even after deleting the media file, it remains visible in the popup window.
Video Link : https://www.loom.com/share/89321a9eb87d4627ab7a67bbfb54c9a8",adhun
Tickets with Patches,59939,"Media: ""Copy URL"" tooltip text may wrap",,Media,5.5,normal,normal,Future Release,defect (bug),new,has-patch,2023-11-21T03:19:50Z,2024-02-25T12:27:58Z,"In the media list view, clicking the ""hoge"" action link displays the tooltip text ""Copied!"".
In certain languages, perhaps non-Latin languages, this text may wrap.
Text wrapping looks unnatural. To use an English analogy, imagine that the text wraps like this:
{{{
Co
pied!
}}}
This text will be very short in any language, so you might want to apply `white-space: nowrap`.",wildworks
Tickets with Patches,24688,Memory exhaustion caused by very many unattached media,,Media,2.5,normal,normal,Future Release,defect (bug),new,has-patch,2013-07-04T18:20:09Z,2018-10-08T09:35:20Z,"A blog with over 30,000 unattached images was exhausting available memory on unattached attachment pages. The exhaustion occurred in `previous_image_link() -> adjacent_image_link() -> get_children()` due to the large number of rows selected with `post_parent=0`.
This is not the only place where `get_posts()` might be called with `post_parent=0`. A similar query appears in `twentythirteen_the_attached_image()` but the effect is wisely mitigated by `fields=ids`. Earlier, `twentyten/loop-attachment.php` called `get_children()` with `post_parent=0` on unattached image pages which is horribly inefficient when there are many unattached images.
Attached patch depends on #24687. The change to `adjacent_image_link()` creates a MySQL query which selects only the desired row. This fixes the memory exhaustion error on the blog with 30,000 unattached images. The once-only filters would be unnecessary if WP_Query accepted arbitrary extra WHERE strings.",andy
Tickets with Patches,55290,Not all image edits are applied to all subsizes,joedolson*,Media,,normal,normal,Future Release,defect (bug),accepted,needs-unit-tests,2022-03-01T22:05:28Z,2024-02-05T20:24:32Z,"When editing an image using the admin editor, not all edits are applied correctly to all image subsizes. Specifically, the problem occurs when an edit results in a smaller size than the defined image size. Given the following image subsizes, and the attached image.
{{{
=> array(6) {
[""thumbnail""]=>
array(3) {
[""width""]=>
int(150)
[""height""]=>
int(150)
[""crop""]=>
bool(true)
}
[""medium""]=>
array(3) {
[""width""]=>
int(300)
[""height""]=>
int(300)
[""crop""]=>
bool(false)
}
[""medium_large""]=>
array(3) {
[""width""]=>
int(768)
[""height""]=>
int(0)
[""crop""]=>
bool(false)
}
[""large""]=>
array(3) {
[""width""]=>
int(1024)
[""height""]=>
int(1024)
[""crop""]=>
bool(false)
}
[""1536x1536""]=>
array(3) {
[""width""]=>
int(1536)
[""height""]=>
int(1536)
[""crop""]=>
bool(false)
}
[""2048x2048""]=>
array(3) {
[""width""]=>
int(2048)
[""height""]=>
int(2048)
[""crop""]=>
bool(false)
}
}
}}}
''The defined sizes above are the ones coming by default with the setting provided below.
''
== Steps to replicate the problem:
1. Upload the image into your installation.
2. After the image is uploaded, click on edit to open the image editor or go to the image editor from within the media library.
3. Click on Edit image
4. Click on rotate image (either right or left) only once.
5. Make sure the changes are applied to all images by checking that the setting Apply changes to: All image sizes is set
6. Click on save
After the image is saved observe the changes were applied only to the following image sizes:
- `thumbnail`
- `medium`
- `large`
- `full`
The only size that was not updated as expected was:
- `medium_large`
== Setup
{{{
### wp-core ###
version: 5.9.1
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%year%/%monthnum%/%day%/%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 1
dotorg_communication: true
### wp-paths-sizes ###
wordpress_path: /app
wordpress_size: 152.90 MB (160327567 bytes)
uploads_path: /app/wp-content/uploads
uploads_size: 22.75 MB (23851112 bytes)
themes_path: /app/wp-content/themes
themes_size: 6.47 MB (6780262 bytes)
plugins_path: /app/wp-content/plugins
plugins_size: 208.42 MB (218539593 bytes)
database_size: 3.96 MB (4149380 bytes)
total_size: 394.49 MB (413647914 bytes)
### wp-active-theme ###
name: Twenty Twenty-Two (twentytwentytwo)
version: 1.0 (latest version: 1.1)
author: the WordPress team
author_website: https://wordpress.org/
parent_theme: none
theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, block-templates, widgets-block-editor, wp-block-styles, editor-style
theme_path: /app/wp-content/themes/twentytwentytwo
auto_update: Disabled
### wp-themes-inactive (3) ###
Twenty Nineteen: version: 2.2, author: the WordPress team, Auto-updates disabled
Twenty Twenty: version: 1.9, author: the WordPress team, Auto-updates disabled
Twenty Twenty-One: version: 1.5, author: the WordPress team, Auto-updates disabled
### wp-plugins-inactive (1) ###
Performance Lab: version: 1.0.0-beta.1, author: WordPress Performance Group, Auto-updates disabled
### wp-media ###
image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1691
imagemagick_version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: File uploads is turned off
post_max_size: 100M
upload_max_filesize: 100M
max_effective_size: 100 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 122 MB
imagick::RESOURCETYPE_DISK: 1073741824
imagick::RESOURCETYPE_FILE: 786432
imagick::RESOURCETYPE_MAP: 512 MB
imagick::RESOURCETYPE_MEMORY: 256 MB
imagick::RESOURCETYPE_THREAD: 1
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP
ghostscript_version: 9.53.3
### wp-server ###
server_architecture: Linux 5.15.12-1-MANJARO x86_64
httpd_software: nginx/1.17.10
php_version: 7.4.28 64bit
php_sapi: fpm-fcgi
max_input_variables: 10000
time_limit: 3
memory_limit: 1G
max_input_time: 900
upload_max_filesize: 100M
php_post_max_size: 100M
curl_version: 7.74.0 OpenSSL/1.1.1k
suhosin: false
imagick_availability: true
pretty_permalinks: true
### wp-database ###
extension: mysqli
server_version: 10.3.27-MariaDB
client_version: mysqlnd 7.4.28
max_allowed_packet: 33554432
max_connections: 151
### wp-constants ###
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /app/wp-content
WP_PLUGIN_DIR: /app/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 1G
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined
### wp-filesystem ###
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable
}}}
",mitogh
Tickets with Patches,39387,Responsive Images Broken When Full Size <= 300 px,joemcgill,Media,4.4,normal,normal,Future Release,defect (bug),reviewing,has-patch,2016-12-24T19:02:49Z,2017-05-18T14:27:41Z,"A quick test of the srcset feature today showed me that WordPress never includes the ""full"" size image in the srcset when the ""thumbnail"" size is inserted in a post. As a result, if the full size was 300 px, the responsive image feature effectively does nothing.
Tested 4.7. Suspect this might go back to 4.4.",miqrogroove
Tickets with Patches,34981,Usage of `image_size_names_choose` breaks JS attachment model attributes,,Media,4.3.1,normal,normal,Future Release,defect (bug),assigned,has-patch,2015-12-10T16:31:31Z,2022-08-03T21:11:43Z,"Here's a small use case that shows how the issue arise.
I want to limit the options of image sizes in the default media modal to so I use the filter `image_size_names_choose` provided in `wp-admin/includes/media.php` and remove the sizes `thumbnail` and as well as `medium`. This brings me the expected result:
[[Image(https://naber.pegasus.uberspace.de/fs/public/images/2015/limit-attachment-sizes.png)]]
With this I have now the problem, that for every thumbnail image in the media library (mode: grid) the large image source is used which is a performance issue if there are more than a couple of images in the library.
The reason is, that the same filter `image_size_names_choose` is also applied to each image in `wp_prepare_attachment_for_js()` and therefore the attachment model does not reflect all available image sizes (`console.log( attachment.sizes )`:
[[Image(https://naber.pegasus.uberspace.de/fs/public/images/2015/attachment-model-sizes.png)]]
Here's a plugin that reproduces the issue in a clean WordPress (4.4) install:
`wp-content/plugins/image_sizes_issue/image_sizes_issue.php`:
{{{#!php
Hello World!}}}
3) Save changes and check that the content of the field is not HTML escaped
4) Add the following line to the current theme
{{{add_filter('user_can_richedit', '__return_false', 999, 0);}}}
5) Go back to the Edit Media screen and save changes again
6) Problem: The content of the field Description is HTML escaped
**Context**
I administer a WordPress website since many years ago and I disabled the WYSIWIG editor setting the value of the filter {{{'user_can_richedit'}}} to {{{false}}}. I like to enter HTML code directly. Now I am unable to use HTML code in the Description field as I did previously.
Probably other users are also facing this problem. ",rafaelcardero
Tickets with Patches,44801,`image_constrain_size_for_editor()` forcing the `$content_width` messes up dimensions,,Media,,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2018-08-15T09:27:19Z,2019-04-15T21:58:52Z,"The `image_constrain_size_for_editor()` currently looks at the `$content_width` global that themes may define. For `medium_large`, `large` and any custom image sizes, the actual image size's width will be evaluated against the `$content_width`, and the minimum will be used.
This results in the following (example):
* Let's say `$content_width` is 640.
* Let's say your `large` image size constraints are 1280x1280.
* Let's say your image in `large` size is 1280x960.
* Instead of using the image size width (1280), it will use the `$content_width` since it's smaller (640), resulting in 640x480 being used for the dimension of the image in `large` size.
This makes sense for the default behavior, but that computed size is used in many different areas, including `wp_prepare_attachment_for_js()`, where the `sizes` property then would show something like this for the `large` size (continuing the above example):
```js
{ width: 640, height: 480, url: '.../my-image-1280x960.jpg', orientation: 'landscape' }
```
Regarding what I want to accomplish with the custom image sizes, this results in unexpected behavior. For example in my case, I was looking into dynamically generating media queries for a background image, using the sizes. I was expecting for my code to generate `@media (max-width: 1280px) ...` for the image, but it would generate `@media (max-width: 640px) ...` due to the changed size.
As I already said, the `$content_width` global makes sense to take into account by default. However, it is currently hardcoded into the function. I think it should be moved into a filter (we already have `editor_max_image_size` which is perfect for that), so that someone could temporarily unhook that behavior for custom use-cases.",flixos90
Tickets with Patches,24815,get_the_post_thumbnail() fetches full sized image if 'post-thumbnail' custom size not defined in theme,,Media,2.9,normal,normal,,defect (bug),new,has-patch,2013-07-22T09:43:42Z,2019-06-04T20:05:46Z,"In wp-includes/post-thumbnail-template.php the $size default value is set as 'post-thumbnail' in the following function:
- get_the_post_thumbnail()
'''Expected behaviour'''
Expected behaviour would be to return the image at 'post-thumbnail' dimensions - however, if this is not set in the theme via:
- set_post_thumbnail_size() function
- add_image_size() function
it returns the full sized sized image begin displayed. I'd expect this to return the image at standard 'thumbnail' size, as some people will just add add_theme_support( 'post-thumbnails' ) and not set (or even need) custom dimensions.
'''Proposal and patch'''
$size default value should default back to 'thumbnail' for normal expected function behaviour if 'post-thumbnail' specific dimensions have not been set.
I'm not sure if it would be more efficient to test against the global variable that holds these values, or use get_intermediate_image_sizes() as I've used in the patch attached - 2nd opinion please?",Jonnyauk
Tickets with Patches,47713,image_get_intermediate_size does not return size if it equals original size,SergeyBiryukov,Media,5.2.2,normal,major,Future Release,defect (bug),reviewing,needs-unit-tests,2019-07-16T12:44:11Z,2020-09-10T14:45:20Z,"Function `image_get_intermediate_size` does not return size if it equal original size.
1. WordPress itself doesn't generate `sizes` metadata item for size equal original image size.
2. `image_get_intermediate_size` looks throught `sizes` metadata and doesn't see necessary size.
3. It doesn't check original image size.
More details here: https://github.com/Yoast/wordpress-seo/issues/10863",mahnunchik
Tickets with Patches,24430,inconsistent icon_dir/icon_dirs use in wp_mime_type_icon and wp_get_attachment_image_src,,Media,2.5,normal,normal,,defect (bug),new,has-patch,2013-05-27T04:33:52Z,2019-06-04T20:05:35Z,"/wp-includes/post.php function wp_mime_type_icon allows for multiple icon image directories by applying the ""icon_dirs"" filter:
{{{
if ( !is_array($icon_files) ) {
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' );
$icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url('images/crystal') );
$dirs = apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) );
$icon_files = array();
while ( $dirs ) {
...
}}}
However, /wp-includes/media.php function wp_get_attachment_image_src does not apply the ""icon_dirs"" filter:
{{{
if ( $icon && $src = wp_mime_type_icon($attachment_id) ) {
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' );
$src_file = $icon_dir . '/' . wp_basename($src);
@list($width, $height) = getimagesize($src_file);
}
}}}
The base filename is always combined with the default Wordress directory path and passed to getimagesize. This means that any additional directories will never be passed to getimagesize(), and an incorrect size or no size at all will be used for any icon image files not sourced from the WordPress default directory.
",dglingren
Tickets with Patches,18730,media_sideload_image() doesn't handle dynamic image url's well,,Media,2.9,normal,normal,,defect (bug),new,has-patch,2011-09-21T10:49:11Z,2020-06-04T17:22:40Z,"Example URL: http://www.tumblr.com/photo/1280/10464566223/1/tumblr_lrum2xzkpC1r3z8e3
As a result, the preg_match() for the file extension fails and issues a notice (no file extension in that url, although the redirection location does have).
The handling of a download failure also seems hairy, upon failure, it still attempts further importing before loading - I haven't looked into that too far.",dd32
Tickets with Patches,34736,wp_calculate_image_srcset filter: provide the individual srcset image size,joemcgill*,Media,4.4,normal,normal,,defect (bug),accepted,has-patch,2015-11-19T03:16:03Z,2019-06-04T20:18:12Z,"When using the `wp_calculate_image_srcset` filter, plugins have access to the `value` (typically the width), but no easy way to access the height of the image being used for that particular srcset source.
Since Core already knows the height of the image being considered, instead of asking a plugin to backwards-engineer it when needed, I suggest we should be explicitly sending the size to make it more functional.
Slack convo: https://wordpress.slack.com/archives/feature-respimg/p1447899460000167
Plugin example: https://github.com/Automattic/jetpack/pull/3040",kraftbj
Tickets with Patches,19512,wp_read_image_metadata includes bitmap in description,,Media,3.3,normal,normal,,defect (bug),new,has-patch,2011-12-12T13:47:40Z,2019-06-04T20:03:02Z,"After uploading a photo that includes (photoshop) bitmaps in the image data, the bitmap data is copied into the image description.
",macbrink
Tickets with Patches,36931,wp_upload_dir caches calls with default arguments separately from their explicit equivalent,,Media,4.5,normal,normal,,defect (bug),new,has-patch,2016-05-24T09:55:05Z,2019-06-04T20:25:34Z,"This a fairly minor bug. Prior to [36565] the following were equivalent
{{{#!php
$upload = wp_upload_dir();
$upload2 = wp_upload_dir( gmstrftime('%Y/%m') );
}}}
(In deed, even `$upload3 = wp_upload_dir( gmstrftime('%Y/%m yabadabadoo') );` is equivalent, but that behaviour is undocumented.)
Since caching has been introduced the first call to `wp_upload_dir()` is stored separately in the cache to the second call, despite the fact that they are otherwise interpreted the same.
This causes a disparity in behaviour when one of the caches is cleared after a setting has been changed:
{{{#!php
$upload = wp_upload_dir();
$upload2 = wp_upload_dir( gmstrftime('%Y/%m') );
// $upload == $upload2
//Disable year/month folders and clear the cache
add_filter( 'pre_option_uploads_use_yearmonth_folders', '__return_null' );
wp_upload_dir( null, false, true );
$upload = wp_upload_dir( null );
$upload2 = wp_upload_dir( gmstrftime('%Y/%m') );
//$upload != $upload2
remove_filter( 'pre_option_uploads_use_yearmonth_folders', '__return_null' );
}}}
",stephenharris
Tickets with Patches,40590,"wp_video_shortcode always adds controls=""controls""",,Media,4.7.4,normal,normal,Future Release,defect (bug),new,has-patch,2017-04-27T22:05:01Z,2019-01-17T21:21:54Z,"wp_video_shortcode always adds `controls=""controls""` to the `
` tags it generates.
The user should be able to pass in a value to `$attr` to disable output of `controls=""controls""`.",paulschreiber
Tickets with Patches,52181,wrong mimetime for gzip files,,Media,5.6,normal,normal,Future Release,defect (bug),new,has-patch,2020-12-27T22:47:17Z,2021-06-07T20:26:56Z,"In the file wp-includes/functions.php, function wp_get_mime_types(), the mimetype for gz|gzip is indicated as ""application/x-gzip"", while fileinfo (and /etc/mimetypes) return ""application/gzip"".
Also, it seems this line is missing tgz, so I would suggest changing this from:
{{{
'gz|gzip' => 'application/x-gzip',
}}}
to:
{{{
'gz|gzip|tgz' => 'application/gzip',
}}}
",liedekef
Unpatched Bugs,48974,-1 being added to image uploads since version 5.3.1,,Media,5.3.1,normal,normal,,defect (bug),reopened,,2019-12-14T19:52:09Z,2020-10-01T18:12:06Z,"Hi, as of the Friday update my image uploads are geting '-1' added to each image
e.g.,
19-1216-iskysoft-christmas19-696x522-1.jpg
19-1216-jla-special-needs-696x522-1.jpg",neotrope
Unpatched Bugs,28989,AJAX in the media library sometimes fails to load data,,Media,3.5,normal,normal,,defect (bug),new,,2014-07-22T20:23:57Z,2019-06-04T20:08:35Z,"I added video and want to replace it now and since AJAX failed (only on this single page, there are no errors when I hit F12 and go to ""Console"" though) I have no other option then to refresh entire page:
[[Image(http://i.gyazo.com/6379480b489e206bfe0b06b06288579b.png)]]
I'm using 4.0-beta2-20140722. I think it wasn't happening that often in 3.9.1 but I may be wrong.",Looimaster
Unpatched Bugs,30052,Add New Media Drag and Drop Hangs on Crunching,,Media,4.0,low,normal,,defect (bug),reopened,,2014-10-20T19:28:52Z,2019-06-04T20:27:30Z,"When using the drag-and-drop feature of ""Media -> Add New"" the upload hangs at ""Crunching..."".
After extensive testing, I have determined this occurs when the auto_increment primary key (ID field) on the ""wp_posts"" table reaches 1000. If I delete content and reset the key to 999 or below ""Add New"" works but, when the key hits 1000 ""Add New"" get stuck at ""Crunching..."". I can find no errors in any logs or by using the ""backtrace-errors.php"" debugging file.
I have been able to duplicate this issue on multiple WordPress servers.
Note - Images do get uploaded and processed and the entries are placed correctly in the database. The problem is that the upload screen gets stuck displaying ""Crunching..."" along side the primary key number.",Gregory_Lang
Unpatched Bugs,45406,Add additional default image sizes for srcset to accommodate wider viewports,joemcgill,Media,5.0,normal,major,Future Release,defect (bug),assigned,,2018-11-23T22:56:02Z,2020-02-24T18:50:10Z,"Related Gutenberg issues:
- 6177 https://github.com/WordPress/gutenberg/issues/6177
- 6131 https://github.com/WordPress/gutenberg/issues/6131
- 11973 (PR) https://github.com/WordPress/gutenberg/pull/11973
Duplicate of Gutenberg issue 11821 https://github.com/WordPress/gutenberg/issues/11821.
== Problem
Images aligned to `alignwide` and `alignfull` need proper size options from the `srcset` attribute. Currently the sizes generated for a large image (eg 4000px wide) by core are:
- original
- 300px
- 768px
- 1024px
(Themes and plugins can generate additional sizes.)
This means for image displays wider than 1024px, the original size image file will be used which imposes a significant performance hit on the end-user.
These sizes should be closely tied to real-world data about viewport widths. Currently the only readily available data is screen sizes. One source is StatCounter's worldwide screen resolution stats http://gs.statcounter.com/screen-resolution-stats. They break down as follows (October 2018):
||= Screen size =||= Usage percentage =||
|| 360x640 || 20.04% ||
|| 1366x768 || 11.84% ||
|| 1920x1080 || 9.4% ||
|| 375x667 || 5.07% ||
|| 1440x900 || 3.26% ||
|| 768x1024 || 2.61% ||
== Proposal
Align automatically generated image sizes to browser stats taking into account 2x and 3x displays.
Proposed new sizing array:
- 375px (covers <=375px widths)
- 768px (covers 768px and 375x2 widths)
- 1125px (covers <=1125px and 375x3 widths)
- 1440px (covers <=1440 widths)
- 1920px
- 2304px (covers <=2304px and 768x3 widths)
- 2880px (covers <=2880px and 1440x2 widths)
- 3840px (covers 1920x2 widths)
This might seem like a lot, but for most images only the smaller sizes will be generated. For larger images, providing these additional sizes available for the `srcset` attribute will ensure the browser pulls down the smallest possible image for wide images displayed in wider viewports.
== Note
This permanently disassociates the physical image sizes from the classic display widths defined by WordPress. Which makes sense because the old modality of pixel widths defining small/medium/large image sizes no longer applies anyway.",mor10
Unpatched Bugs,49587,Add error handling for the media manager Ajax response,,Media,3.5,normal,normal,Future Release,defect (bug),new,,2020-03-06T11:00:27Z,2021-03-02T21:47:47Z,"When the media manager modal performs an Ajax request to query attachments, if the Ajax call responds with an error then the user is presented with an eternal loading spinner and no indication there has been a problem.
I think there are two places which need a `fail()` handler for the Ajax promise:
* `wp.media.model.Attachments.more()`
* `wp.media.model.Query.more()`
I haven't done any testing yet though to confirm this.
Needs a decision around how best to present an error to a user. Probably needs UI work; maybe one of the UI pieces such as the upload failure message can be reused.",johnbillion
Unpatched Bugs,22940,Adding term checklist to Media modal has undesired results,,Media,3.5,normal,normal,,defect (bug),new,,2012-12-14T14:59:27Z,2019-06-04T20:04:30Z,"If you use '''attachment_fields_to_edit''' to add a term checklist to the media modal, there is no way to know when a term is unchecked. I propose that when a checkbox is clicked in the compat section, all the checked boxes of the same name are passed in the POST request.",jfarthing84
Unpatched Bugs,59308,Attachment custom fields not rendered in some cases,,Media,6.3.1,normal,normal,Future Release,defect (bug),new,,2023-09-07T09:50:21Z,2024-02-14T17:05:47Z,"This is a follow-up to #58051.
I've noticed that in some cases custom fields added via `attachment_fields_to_edit` do not show up when the ""Featured Image"" modal is opened after clicking a ""featured image"". I then need to first click on another attachment and then back to have the custom fields show up.
It seems that this bug only happens when you have a lot of images (more than 1 page) and the featured image you're looking at is not on the first page. It's easy to reproduce.
If absolutely necessary I can set up a clean WordPress and make a screen recording of this bug, as I rather not share the images and data in our WordPress installation.",SeBsZ
Unpatched Bugs,48522,Attachment size not generated when large images uploaded,,Media,5.3,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2019-11-07T01:33:39Z,2020-10-16T20:03:30Z,"I've noticed that some images during upload do not generate attachment sizes at all, or generate the sizes partially. An example of such an image: https://upload.wikimedia.org/wikipedia/commons/f/ff/Pizigani_1367_Chart_10MB.jpg
Upload is successful, but there's no scaled image, as well as no attachments. ",vanyukov
Unpatched Bugs,42978,Automatically clear file upload error messages,,Media,,normal,normal,Future Release,defect (bug),new,,2017-12-25T15:50:20Z,2020-08-31T10:09:33Z,"When an error occurs on file upload in the media uploader while drafting a post, the error message persists after both a) another file is successfully uploaded, b) the media manager is closed and re-opened.
In both of these cases, it is my opinion that the user is best served by having the error message automatically dismissed, as
1. Its positioning is not typical of a ""historic/cumulative"" error log,
2. It may be assumed that by successfully uploading another file the error first encountered is no longer relevant, and
3. An indefinite amount of time may have passed since the error was first encountered and the media manager subsequently closed and the next time the media manager/upload div was re-opened such that the user may have completely forgotten about the error and may be confused to see a red error box and mistakenly think it is associated with some action he/she just took,
4. As a dialog, nothing about the media manager suggests that its state should persist after being closed and re-opened.
(see attachment as an example of an error)",ComputerGuru
Unpatched Bugs,29931,"Broken attachment page links for files attached to ""Auto Draft"" posts",,Media,3.4.2,normal,normal,,defect (bug),new,,2014-10-11T18:06:08Z,2019-06-04T20:09:34Z,"'''Steps to Replicate'''
1. Create a new post without a title.
2. Use the Add Media button within the post editor to upload files, but do not insert the files into the post.
3. Close the post editor without saving the draft.
4. Go to the Media Library
5. Notice the files show as being uploaded to a post called Auto Draft.
6. Try to view the attachment page, but get a “404 Page Not Found” error.
'''Recommended fix:'''
Do not attach files to a post that has a blank title and body. Leave the files unattached until text has been entered into the title or body of the post.",dcoleonline
Unpatched Bugs,51992,Bug in Media Thumbnail for DWG file,,Media,5.6,normal,major,Future Release,defect (bug),new,,2020-12-09T14:56:40Z,2021-02-17T00:22:27Z,"Hi,
since today's update the file name of DWG files are not shown anymore unlike the PDF files. I have allowed DWG to be uploaded. Can you help? Thanks
",mschuessler
Unpatched Bugs,25076,CSS issue with native video player and flash fallback on full screen,wonderboymusic,Media,3.6,normal,minor,,defect (bug),assigned,,2013-08-18T21:02:34Z,2019-06-04T20:05:52Z,"Hi,
I noticed there's a bug with the CSS and the new native video player introduced in v3.6.
This is how it looks when not using full screen:
[[Image(http://img11.imageshack.us/img11/1374/g0n.png)]]
And this is how it looks when using full screen:
[[Image(http://img823.imageshack.us/img823/7278/qna.png)]]
It automatically changes the color of the bar.
This is the shortcode I'm using to show the video:
{{{
[video src=""video.mp4"" width=""640"" height=""360"" autoplay=""true"" loop=""true""]
}}}
I tested this on a fresh WP 3.6 installation with Twenty Thirteen theme. This is the CSS:
{{{
.mejs-container, .mejs-embed, .mejs-embed body {
background: #464646;
}
.mejs-controls .mejs-time-rail .mejs-time-loaded {
background: #21759b;
}
.mejs-controls .mejs-time-rail .mejs-time-current {
background: #d54e21;
}
.me-cannotplay {
width: auto !important;
}
}}}
I also tested it on a post and on a page, happens the same on both.",leandroprz
Unpatched Bugs,18275,Can't get perfect thumbnail sizes with image editor,,Media,3.2.1,normal,normal,Future Release,defect (bug),new,,2011-07-28T02:37:16Z,2017-06-27T16:14:27Z,"In the media settings, I have the thumbnail set to a fixed size (218x145), and set to crop to these exact dimensions.
Sometimes the automatic thumbnail crops off people's heads, etc, so I use the Image Editor to manually adjust the thumbnail. I select a rectangle, set the aspect ratio to 218x145, click crop, apply to thumbnail only, and save.
However, sometimes that results in an image slightly off in dimensions - for example, 215x145.
I expect this is a rounding error. However, it happens even if I select an area much bigger than this when cropping in the Image Editor - eg 300x200. After I click crop and see the 300x200 image, I would expect the thumbnail to be automatically be created at 218x145 like it does normally based on this adjusted image - however, it appears the checkbox for using exact dimensions doesn't apply here. (In fact, if I select, say 300x300, it will make my thumbnail 145x145).
This feels like a bug to me, and makes it very hard to generate thumbnails at the size I want.",smerriman
Unpatched Bugs,31177,Captions video not saved with the post and are lost on attachment page,postphotos,Media,4.1,normal,normal,Future Release,defect (bug),assigned,,2015-01-29T16:13:09Z,2024-01-24T17:36:59Z,"At the moment you can add srt-captions and a poster image to a video, entering them while embedding a video in a post.
When you add a video via Add Media in a post the output will be something like:
{{{[video poster=""url-here/image.jpg"" width=""400"" height=""224"" mp4=""url-here/video.mp4""] [/video]}}}
This means that the poster and the captions are not stored with the attachment itself, so on attachment this data is lost pages and it is impossible to add a caption or a poster image via the image library.
It would be useful to save srt-captions and the poster with the attachment data itself, like the description and the caption now are.
",rianrietveld
Unpatched Bugs,39422,Consistency for returned value of attachment meta : mime_type VS mime-type,,Media,4.6.1,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2016-12-29T22:55:29Z,2017-10-31T10:14:23Z,"Hello here,
While using the function wp_get_attachment_metadata, the returned associative array is not consistent.
For video attachment it will give mime_type key with a ""_"" and for images it will return mime-type key with a ""-"".
The returned mime type key should either be ""mime_type"" or ""mime-type"", but should be the same for any type of media attachment.
Thanks for the great job !
",gabrielstuff
Unpatched Bugs,32012,Crunching doesn't work on some grayscale images,,Media,4.1.1,normal,normal,,defect (bug),new,,2015-04-18T13:46:09Z,2019-06-04T20:12:44Z,"No error message, just no thumbnail/smaller sizes crunched on upload of a grayscale image.
Some images work, others not. All are similar sizes, 32-bit grayscale, under 2MB with varying dimensions.
I have followed the relevant steps at: https://wordpress.org/support/topic/25-imagemedia-uploader-problems?replies=1",nifwlseirff
Unpatched Bugs,33713,Customizer: allowing to set files other than image for Header background and background image,,Media,4.3,normal,major,Future Release,defect (bug),new,,2015-09-03T18:11:48Z,2021-05-23T18:04:08Z,"When we set header background image or background image from customizer settings, media upload should not allow to upload files other than image.
We can set files other than image, and it shows broken in preview
",umesh.nevase
Unpatched Bugs,47130,Drop files to upload is also available except Upload Media tab,,Media,5.1.1,normal,normal,Future Release,defect (bug),reopened,,2019-05-06T10:31:46Z,2021-08-12T14:38:08Z,"Howdy Developers,
As per my understanding, `Drop files to upload` feature should be enabled during `Upload media` only.
Instead of that, I have noticed that whenever Crop Image or any other popup for media is open, then `Drop files to upload` is still there.
",malavvasita
Unpatched Bugs,27427,Edit Gallery view does not display images in original aspect ratio,,Media,3.5,normal,normal,,defect (bug),new,,2014-03-15T18:38:26Z,2019-06-04T20:07:06Z,"Тhe new gallery preview does display thumbnails in their original aspect ratios, although the modal for creating and editing the gallery does not.
The goal is to show the thumbnails in their original ratio which happens when the thumbnails are not square. This happens, for example, if the thumbnail size in Media Settings is 200 (W) x 400 (H), ""Crop thumbnail to exact dimensions"" is not checked. Placement of a certain thumbnail within the gallery often depends on the orientation, and it is very difficult if we show a square shape instead of the real shape.
More details:
https://core.trac.wordpress.org/ticket/26959
http://wordpress.org/support/topic/edit-gallery-square-thumbnails-vs-portrait-and-lanscape?replies=2",Greybox
Unpatched Bugs,43816,Editing Image Can Lead to Mixed Metadata,,Media,4.9.5,normal,normal,Future Release,defect (bug),new,,2018-04-20T00:04:30Z,2022-11-23T16:09:37Z,"== Summary
If an image is uploaded at a size allowing the creation of a defined image size (ie, ""large"", ""twentyseventeen-featured-image"", etc.) and the image is then edited to a size which doesn't allow that defined size to be created, the non-supported size can still be placed and will display the original image.
== Steps to Reproduce
1. Upload an image which is slightly larger than a defined image size in a particular theme (for example, if using the WordPress default definition for ""large"" images, 1,024 pixels, upload an image 1,100 pixels wide)
1. Edit the image, and scale or crop it to be 1,000 pixels wide
1. Save edit
1. Within the post editor, ""add media"", select the ""large"" image size, and place within body of post
=== Expected Behavior
* //Developer//: The ""large"" image should not be able to be selected within the ""Place Media"" dialog
* //Regular user//: The ""large"" image placed should reflect the image edit
=== Result
The ""large"" size is selectable and the **original** image is placed within the page.
=== Other Effects
In this particular example, if the Media Library is in ""grid"" view, and our edited image is selected, the dialog which opens will display the incorrect original image, as the dialog preferentially uses the ""large"" image size.
== Source of Behavior
I believe the problem stems from line 880 of https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-admin/includes/image-edit.php :
{{{
$meta['sizes'] = array_merge( $meta['sizes'], $img->multi_resize( $_sizes ) );
}}}
* `$meta['sizes']` contains all of the sizes which were able to be created when the image was uploaded
* The return from `$img->multi_resize()` only has keys set for those sizes that can be created from the edited image
* Using `array_merge` keeps the original values not returned by `$img->multi_resize()`, despite the fact they are no longer valid for this edit
== Fix
I believe the fix may be as simple as simply returning the result of `$img->multi_resize()` without merging it into the existing `$meta['sizes']`, which are mainly used in this context to create the `_wp_attachment_backup_sizes` array.
{{{
$meta['sizes'] = $img->multi_resize( $_sizes );
}}}",rogerlos
Unpatched Bugs,44754,Error saving data from 'custom fields' of type select / checkbox (multiple) in Attachment Modal,,Media,,normal,major,Future Release,defect (bug),new,,2018-08-08T12:41:01Z,2019-04-15T21:43:45Z,"It's my first ticket, and I have little idea of English, I apologize if I did wrong.
The method used to save the custom fields in the Attache modal, I think, is poorly implemented. The problem comes when you have a field of multiple type (select or checkbox). At the time of parsing the form, the jQuery serializeArray function is used. This returns an array of key / value objects with all the items in the form.
The moment you have a field of multiple type whose name value has '[]', if there are multiple values selected, they are overwritten with the selected item from the list of elements.
Error is located in the _.each of line 72 of the file:
https://core.trac.wordpress.org/browser/trunk/src/js/media/views/attachment-compat.js
{{{
65 save: function( event ) {
66 var data = {};
67
68 if ( event ) {
69 event.preventDefault();
70 }
71
72 _.each( **this.$el.serializeArray()**, function( pair ) {
73 data[ pair.name ] = pair.value;
74 });
75
76 this.controller.trigger( 'attachment:compat:waiting', ['waiting'] );
77 this.model.saveCompat( data ).always( _.bind( this.postSave, this ) );
78 },
}}}
The result of serializeArray () is
[[Image(https://actycrea.com/img/wordpress/before.png)]]
And the result after the _.each is:
[[Image(https://actycrea.com/img/wordpress/after.png)]]
As you can see, it deletes all the elements previous to the last one of the same key.
I think the best way to fix it is this:
{{{
65 save: function( event ) {
66 var data = {};
67
68 if ( event ) {
69 event.preventDefault();
70 }
71
72 _.each( this.$el.serializeArray(), function( pair ) {
73 if ( $.trim( pair.name ).length ) {
74 if ( typeof( data[ pair.name ] ) == 'object' ) {
75 data[ pair.name ].push( pair.value );
76 } else if ( pair.name.indexOf( '[]' ) > -1 ) {
77 data[ pair.name ] = new Array( pair.value );
78 } else {
79 data[ pair.name ] = pair.value;
80 }
81 }
82 });
83
84 this.controller.trigger( 'attachment:compat:waiting', ['waiting'] );
85 this.model.saveCompat( data ).always( _.bind( this.postSave, this ) );
86 },
}}}
By doing this, it would return the following data object:
[[Image(https://actycrea.com/img/wordpress/finally.png)]]
I explained? I'm very sorry for my English ...
Fernando.
",fobiaxx
Unpatched Bugs,52535,Excess text read with errors in Media Library,joedolson,Media,,normal,normal,Future Release,defect (bug),assigned,,2021-02-16T04:13:15Z,2021-02-26T15:59:45Z,"When an error is generated in the media library, the error is read only after reading two separate versions of the page title and the upload media button text. This is most immediately caused by executing the error message in a `._delay` call, but this is actually a symptom; the delay is necessary.
This is most likely due to an extra Backbone model refresh that occurs after the error. Resolving this issue may only be possible by refactoring the media library to avoid the additional refresh.
Delaying the execution of the message ensures that the message is read without being interrupted by the extra Backbone refresh; it would be preferable, however, if the extra refresh didn't happen, or happened prior to the error.
This ticket follows #47120, resolving the lack of accessible messages on upload errors. ",joedolson
Unpatched Bugs,32302,Filename policy of IMAGE_EDIT_OVERWRITE==true seems to create CDN and browser cache issues,,Media,2.9,normal,normal,,defect (bug),new,,2015-05-08T03:22:59Z,2019-06-04T20:13:12Z,"Just something to check, as discussed over at https://deliciousbrains.com/undefined-define-image_edit_overwrite/
It states the behaviour:
""When you add define( 'IMAGE_EDIT_OVERWRITE', true ); to your wp-config.php the behaviour changes. When you edit an image, it still creates a new image and leaves the original image alone. '''But when you edit again, it overwrites the first set of images rather than create a new set.'''""
My comment: ""what about CDN and browser caching? If the ""unique appendage"" didn't change, then readers won't see the updated image until the cache expires, which for our site at least is 'forever'. If the first edit were to be deleted, wouldn't it be more sensible to still generate a new ""unique appendage"", rather than using the same one? But then again, that could break existing references to the first edit... oh my it becomes messy quickly!""
Brad's reply: ""Excellent point! I think you're right. When IMAGE_EDIT_OVERWRITE is set to true, it should create a new unique appendage instead of reusing the old one. You should open up a Trac ticket for this to be looked at and discussed.""
Are you able to provide any clarification?
Many thanks,
Aidan",aidanlane
Unpatched Bugs,48842,Fix calculation error when resampling images before resizing in class-wp-image-editor-imagick.php,,Media,4.5,high,normal,Future Release,defect (bug),new,dev-feedback,2019-11-30T18:34:34Z,2020-10-15T14:23:17Z,"Seems there is a calculation error when resampling large images before resizing them to a much smaller sub-size. Looking at #33642 and [36700], the idea is to efficiently reduce the size of the original image before resizing by using ImageMagick's `sampleImage()`.
However in some cases the resampled image may be larger than the original. Caused by doing the resampling when the destination image is about 1/3 of the size of the original, and using a (hard-coded) `$sample_factor = 5`, see https://core.trac.wordpress.org/browser/tags/5.3/src/wp-includes/class-wp-image-editor-imagick.php#L333.
Example: for an original image of 1000x500 and destination image of 300x150, the resampled source image will be 1500x750 (the `$resize_ratio` in this case is `0.09`).",azaozz
Unpatched Bugs,33896,Gallery linking to Attachment page,,Media,,normal,normal,,defect (bug),new,,2015-09-16T13:52:16Z,2019-06-04T20:16:05Z,"I have received some user reports recently, that they are using internal WordPress gallery (which was improved) and there is some strange problem.
- Create new post
- Create new gallery with existing images from Media library (do not upload new images).
- Link gallery to Attachment page.
- See post on website, click on first image in gallery.
- You will see links to next/previous image, but not related to user created gallery. Instead of created gallery you can see all images attached (uploaded) to some other post.
Users do not understand that this is how it works (gallery shortcode x attachments uploaded to post), they are only asking what is wrong. Maybe we should disable possibility to link to Attachment page when all images from gallery are not uploaded to current post?",pavelevap
Unpatched Bugs,47531,Handling WP embed (native) Audioplayer's Volume Slider with keyboard defective,,Media,5.2.1,normal,normal,Future Release,defect (bug),new,,2019-06-12T12:05:25Z,2019-08-29T14:35:16Z,"
As I underestand, handling audioplayers with Tab/Arrows/Enter should be universal with all browsers. I have built a test-webpage from my main web page, consisting some audio-books for children. There are several single WP embed (native) players: https://midripai.ee/s3/pai/pai-kuulata-yksiti-wpn/.
Moving with Tab-key onto volume slider, it should be increasing volume by Right Arrow, and decrease by Left Arrow (at least Screenreader Orca in Linux tells to do so). Instead of that, the Down Arrow decreases volume, and ''the Up Arrow does nothing''.
Of course, the volume can be handled by Up/Down arrow, being either on Time Slider; or on Mute Button (it seems not to depend of web browser: at least Chrome and Firefox do work similarly.) Yet bringing volume down, being on Volume Slider by Down Arrow could be annoying for visually impaired, as one needs to move back onto Mute Button or Time Slider of the same player to increase volume again. Being on the Play/Pause button, the Down Arrow also decreases volume; and Up Arrow does nothing.
The same problem occurs also with WP embed (native) Playlist Player.
Tested: Win7-64 bit: Both Chrome (74; 75.0.3770.80 = the latest) and Firefox (67.02); and
Linux Mint Mate 18.3 64 bit: Chromium 73.0.3683.86 and Firefox (67.0)
Laptops: Fujitsu E8420 and Lenovo w500 internal keyboards and also external ps2 and USB-keyboard.
Both with Blocks and blocks switched off (with plugin Classic editor); and also disabled all plugins for test). I did not use special Audio-blocks though.",Juhan108
Unpatched Bugs,52495,"Hard cropped images do not crop specified dimension, causing lack of adaptive images",joedolson*,Media,5.6.1,normal,normal,Future Release,defect (bug),accepted,,2021-02-11T05:30:26Z,2022-06-08T15:51:48Z,"If an image is less than the size of a specified image size, it will be cropped only on the dimension that is greater than the specified dimension. The result is an image that is not the same aspect ratio as other images with specified image sizes that have the same aspect ratio. So it won't output those other images in an srcset and your site may be loading much larger images than needed for mobile.
For example, I might have defined image sizes of 1000x500, 750x375 and 500x250 and use those images in my theme. Normally, I'd insert that largest image and then the other two would be in an srcset. But, if I were to upload and 960x600 image, I'll get a 960x500 image, as well as the normal 750x375 and 500x250. Because these aren't the same aspect ratio, when I insert the larger image, there is no srcset. Now visitors are stuck loading the largest image.
It would make sense to me for hard crop to scale the image up to meet the minimum size for both dimensions, then crop.",larssg
Unpatched Bugs,30759,"If Featured Image is selected, but not saved, editing the image will drop the selection after a save",,Media,4.0.1,normal,normal,,defect (bug),new,,2014-12-18T07:56:17Z,2019-06-04T20:10:14Z,"To reproduce:
Create a new post.
Click on an image to select it.
Click on Edit Image link, edit image, and save.
Image selection menu has changed dimensions, and the selection state has returned to its prior state.
If a featured image has already been assigned to the article, selecting another image, and editing it will return the user to an image selection screen with the prior featured image selected.",DavidTheMachine
Unpatched Bugs,35489,Im having an issue with WP_Image_Editor_Imagick,,Media,4.4.1,normal,normal,,defect (bug),new,,2016-01-16T20:39:07Z,2019-06-04T20:21:12Z,"Im using this following to set up an editor to create thumbs for an image I am uploading:
$editor = wp_get_image_editor( $file );
Some images are crashing my script causing a 500 error.
I tracked the issue down to the WP_Image_Editor_Imagick class specifically within the crop_image function.
From what I could tell this is the line causing my 500 error
at line 349 of class-wp-image-editor-imagick.php
$this->image->cropImage( $src_w, $src_h, $src_x, $src_y );
I fixed the issue in a band-aid class I am temporarily using removing the WP class and using my own with the wp_image_editors filter
within my added class I am using I added the following line
$this->image->setResourceLimit(6, 1); // set max threads to 1
I added it just before
$this->image->cropImage( $src_w, $src_h, $src_x, $src_y );
",stoi2m1
Unpatched Bugs,35085,"Image editor not cropping correctly when image size is the same as ""Large Size"" in media settings",,Media,4.4,normal,normal,,defect (bug),new,,2015-12-14T22:49:02Z,2019-06-04T20:19:52Z,"This issue was reported as an issue for the plugin Imsanity here: https://wordpress.org/support/topic/imsanity-breaks-the-image-editor?replies=10
However, after research, it appears this behavior happens regardless of the plugin. A video demonstrating the error is at: https://www.youtube.com/watch?v=3a6UbuPrlmU&feature=youtu.be
To reproduce:
1. Ensure media settings for ""Large Size"" are set to 1024px
2. Upload a landscape image with a width of exactly 1024px to the media library
3. Click the ""Edit"" button to edit the image, and use the crop tool to make an obvious change. The image will appear to have been cropped at this point
4. Click the ""Save"" button and now the image will no longer appear to be cropped
The image now seems to be in an unknown state where the preview shows the un-cropped version, but in the editor the crop shows correctly.
",verysimple
Unpatched Bugs,32215,Image hard crop no longer working as expected,,Media,4.2.1,normal,normal,,defect (bug),new,,2015-04-30T20:37:21Z,2019-06-04T20:12:58Z,"Since I upgraded to 4.2.1, hard cropping of images no longer seems to work (resizing always occurs using soft-crop mode, resizing the larger dimension first, then cropping the smaller to size). I am regenerating them using the regenerate thumbnails plugin (which works fine), and am looking at the images directly on the server (FTP) to eliminate the possibility that any CSS might be producing strange results. It is a custom theme that I built, but I switched the site over to Twenty Fourteen to rule out my code and got the same results. I also tried disabling plugins, to no avail.
I am running my production site on the same server (which is running 3.8.7) and the crop works fine.",WorldWideWebb
Unpatched Bugs,59331,Image optimizations fail to apply when using Timber,,Media,6.3,normal,normal,Future Release,defect (bug),new,,2023-09-12T17:46:01Z,2023-09-12T21:45:19Z,"A user [https://mastodon.social/@grigs@front-end.social/111052735378137214 reported] hero images were getting `loading=lazy` on their site. After inquiring, I found they were using Timber for templating. It makes sense that the logic in `wp_get_loading_optimization_attributes()` wouldn't work properly in this case since it is tightly bound to WordPress's templating system(s). This may actually be an issue better fixed in Timber itself, but ideally WordPress core should be able to do the right thing with alternate templating systems (or even complex templates written in the WordPress way). Ultimately, this may require the use of output buffering and HTML Tag Processor as [https://github.com/WordPress/performance/issues/805 proposed] for a module in the Performance Lab plugin. See #59331 for adding output buffering for template renders with a filter for post-processing.
Here's how to reproduce the issue with Timber:
1. Install and activate the [https://wordpress.org/plugins/timber-library/ Timber plugin] from WordPress.org.
2. Install and activate the [https://github.com/timber/starter-theme Timber Starter Theme] from GitHub (i.e. download the ZIP).
3. Add a new post with an initial large image or a featured image.
4. See the image has `loading=lazy` and is missing `fetchpriority=high` on the frontend.
Initial image block:
{{{
}}}
Featured image markup:
{{{
}}}",westonruter
Unpatched Bugs,43152,Image remains in page after deleting from Media Library,,Media,4.9.2,normal,normal,Future Release,defect (bug),new,,2018-01-24T00:31:39Z,2019-04-15T15:21:13Z,"Whilst editing your page, if you open the Media Library (using the Add Media button), and then delete an image that is currently added to the page, the image remains on the page after closing the pop-up window.
To Reproduce:
- Insert Image on Page
- Click Add Media button to display the Media Library popup Window
- Select the image that you previously inserted on the page and delete the image
- Close the media pop-up window
- Image that was deleted remains on page
Here's a gif to show an example - https://cl.ly/1I2r3q3H301J
I originally raised this as an [https://github.com/WordPress/gutenberg/issues/4610 issue with Gutenberg], but it was suggested to raise it here since it's also an issue with the classic editor.",ahortin
Unpatched Bugs,26848,Image thumbnail on large images with ratio of 4:1,markoheijnen,Media,3.8,normal,minor,,defect (bug),assigned,,2014-01-16T16:12:43Z,2019-06-04T20:06:26Z,"I have been running into this issue on WordPress 3.7.1 and 3.8. I haven't tested it in older versions.
I'm uploading an image that's 2000px x 500px.
The theme uses add_image_size for a variety of different thumbnail sizes but the only one that's an issue is 480px.
The URL to the thumbnail is being retrieved with wp_get_attachment_image_src( $thumbnail_id, 'mobile' ) for use with some CSS. Chrome is recognising it as a 1px x 1px image with a MIME type of image/png. When you open the image URL it appears correctly.
'''Steps to reproduce:'''
add_image_size( 'mobile', 480, 0, true ); in functions.php
Upload a blank image at 2000px x 500px
I also found in Chrome that when going to my uploads folder and selecting the image that's 480px x 120px I can't save the image with CMD SHIFT S yet I can with any of the other images.
I have tried removing all plugins and using the default theme. The only modification I made was to add the image size.
I changed the image library from libgd to imagemagick.
Changing the image size from 480px to 479px works.",nathan_dawson
Unpatched Bugs,54839,Image upload after dirty filter requires filter change before it can be inserted to page,,Media,,normal,normal,Future Release,defect (bug),new,,2022-01-17T08:15:54Z,2024-02-05T20:14:53Z,"Steps:
1. Open media library popup.
2. Change date filter.
3. Upload new image.
4. See uploaded image is not visible in list nor selectable. (Select button is disabled)
5. Change filter to match the new image uploaded, See image is visible.
Expected behavior:
1. Uploaded image should be selectable if it matches filter (or should reset filter on tab change).
Current behavior:
1. Uploaded image after dirty filter is not selectable.",utkarshpatel
Unpatched Bugs,39980,Improve handling of image previews for non-image files,joemcgill,Media,4.7,normal,critical,Future Release,defect (bug),assigned,,2017-02-28T02:57:40Z,2017-05-20T20:16:18Z,"Follow up from #31050.
The changes to the `image_downsize()` and `image_get_intermediate_size()` functions introduced in [38949] added regressions to the `'image_downsize'` and `'image_get_intermediate_size'` filters, running them for non-image attachments.
Best option to fix this seems to be to introduce new function(s) with new filter(s) specifically for handling this case: adding image preview to non-image attachment.
This will fix the regressions, and will make it possible for plugins to hook into this functionality.",azaozz
Unpatched Bugs,47456,Improve the user interface to ensure correct usage of the image alt text,joedolson*,Media,,high,normal,Future Release,defect (bug),accepted,,2019-06-01T11:15:23Z,2024-03-23T20:36:09Z,"Splitting this out from the [https://github.com/WordPress/gutenberg/issues/created_by/karlgroves WPCampus accessibility report issues on the Gutenberg GitHub], see https://github.com/WordPress/gutenberg/issues/15309 as part of the reported issue applies to the Media Views in core.
Related: #41467
== Problem
A common misconception is that the image alt text should always be a ""description of the image"". In most of the cases, this is misleading. Actually, the image alt text needs to describe the purpose of the image in its specific context. For more details, see the W3C Alt Text Decision Tree tutorial (https://www.w3.org/WAI/tutorials/images/decision-tree/).
WordPress stores a ""default"" alt text in the media object. While storing a default value may help users when they build their content, it also promotes a misunderstanding of the purpose of the alt text.
In the accessibility team, we think this is more an user interface problem rather than a data model problem. The user interface should ensure users clearly understand that alt attributes are context sensitive and that the ""default"" alt value needs to be changed (or even removed) based on the specific usage.
== Data model problem:
The alt text is not constant: it needs to describe the image purpose on a case by case basis.
== User interface problem:
The alt text from the media library is automatically assigned as the alt text within the post: this is not always correct. Actually, in most of the cases it produces wrong alt text.
== Improvements to evaluate
Credits: Some of the following points come from @carlseibert and @joedolson comments on #41467, and from the Gutenberg GitHub issue.
1. allow saving multiple alt attributes for a given media object: a default attribute and a set of alternates users can select from
2. have something in the editor UI that would let users know whether the alt text was filled, and what it says
3. modifications on the Media views side to differentiate between the alt text describing the image and the alt text for a specific usage, which might override the normal alt text without changing it
4. all linked images must have alternative text if the image is the sole content of the link, and the action should be blocked if this is not true
5. any guidance given should inform users that the text provided needs to inform the user of the link action
6. include a warning about linking directly to the image file: linking directly to images is inadvisable, because the resulting image view in the browser does not include alternate text
7. when the image is linked to the image file itself, the alt text can remain the normal alternative text for that image, with an appended indicator that the link is to view the image
8. worth considering plugins that add ""lightbox"" modals, sliders and the like often use the alt text value to add contextual text within their UI
9. images used to link to other resources should offer a field to add dedicated link text separate from the image's own description; in this case the alt text should be empty. Example markup (simplified):",afercia
Unpatched Bugs,24888,"In image editor, cropping scale gets applied off by 0.4%",,Media,3.5,normal,normal,,defect (bug),new,,2013-07-30T13:55:51Z,2019-06-04T20:05:48Z,"When you scale the crop preview, the editor does not keep the right ratio.
To reproduce this error:
- Upload an image with 4608 x 3072
- On the crop feature, create an selection with 1680 x 560
- Hold shift and scale to fit all image width (4608px)
- The height result was 1544px, that is wrong, the correct is 1536px.
",diegomarangoni
Unpatched Bugs,36285,Inconsistency between the filters that can be used to override the default shortcode output for images/videos/audio,,Media,,normal,normal,Future Release,defect (bug),new,,2016-03-21T18:15:59Z,2017-07-27T16:13:03Z,"Currently, in order to override the default output of the {{{caption}}}, {{{video}}} and {{{audio}}} shortcodes, you have to use the following respectively:
{{{
apply_filters( 'img_caption_shortcode', '', $attr, $content );
apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instance );
apply_filters( 'wp_video_shortcode_override', '', $attr, $content, $instance );
}}}
Imho, there should be some consistency between these regarding the following:
* hook name.
* arguments passed to the filtering function.
Also, it would be very useful if the attachment ID was also passed to the filtering function.
Right now, the attachment ID of images can be obtained from {{{$attr['id']}}}, which gives {{{attachment_IDNUMBER}}}, while the ID of video and audio attachments can only be obtained by using the media file URL found in the {{{$attr}}} array and directly querying the database in order to get the post ID based on the {{{guid}}} field.
",gnotaras
Unpatched Bugs,53665,Incorrect mime type saved on attachment for scaled/rotated images processed with image_editor_output_format filter,,Media,5.8,normal,normal,Future Release,defect (bug),new,,2021-07-15T11:30:14Z,2021-11-01T21:59:28Z,"When the `image_editor_output_format` filter is used to change the format of jpeg images during the upload of a new large or rotated image, the mime type saved to the `posts` table record is for the `original_image` and not the `-scaled` or `-rotated` ""full"" size image that is used throughout the admin area.
Example filter:
{{{
add_filter( 'image_editor_output_format', function( $formats ) {
$formats['image/jpeg'] = 'image/webp';
return $formats;
} );
}}}
From an original file called ""picture.jpg"" this will produce a file called ""picture-scaled.webp"" that is used in the Media Library.
When viewing the details of the image from the Media Library's grid view, the overlay panel shows the mime type of the webp file as ""image/jpeg"". See attached screenshot for an example.
This may confuse some users.
It may also have a knock-on effect for themes or plugins that use the stored mime type rather than deduce it from a file's extension.",ianmjones
Unpatched Bugs,47137,Insufficient form semantics,joedolson*,Media,,normal,minor,Future Release,defect (bug),accepted,,2019-05-06T14:33:17Z,2024-02-01T20:40:12Z,"Moved from the WPCampus accessibility report issues on GitHub, see
https://github.com/WordPress/gutenberg/issues/15305
* **Severity**:
* Low
* **Affected Populations**:
* Blind
* Cognitively Impaired
* **Platform(s):**
* All / Universal
* **Components affected**:
* Media Dialog
**Issue description**
The ""Media Library"" panel of the ""Featured Image"" modal dialog lists
some filtering of options, a group of checkboxes, a sub-form of relevant
meta-data, and a ""Select"" button. However there are no semantics which
associate these controls together, nor give the orphan ""Select"" button
any meaning relative to the selected checkbox/image.
Additionally, a link taking users to a new window/tab with an editing
form does not inform users that it opens a new window or tab.
Semantic markup is vital for assistive technology users, to convey the
structure and relationships between information. When appropriate
semantic markup is not used, it may be more difficult for such users to
understand what the content means, and to comprehend the structure that
the visual presentation conveys.
**Issue Code**
{{{