Thanks for your help.
Managed to figure out a temporary solution, should anyone else have a similar query.
Temporarily edited media.php
$filename = basename( wp_get_attachment_url( $attachment_id ) );
$default_types = wp_get_video_extensions();
$defaults_atts = array(
'src' => '',
'poster' => "diary/wp-content/Pictures/posters/".$filename.".jpg'",
'loop' => '',
'autoplay' => '',
'preload' => 'none',
'width' => 640,
'height' => 360,
'class' => 'wp-video-shortcode',
);
I’ve stripped the url from the wp_get_attachment_url() attachment and plopped it directly into the ‘poster’ attribute.
Next, I’ll have to figure out a way of writing it as a function, rather than edit media.php on every update 🙂
Related Posts:
- How to add HTML into error message
- Upload Multiple Files With media_handle_upload
- Remove “Insert from URL” link in Media upload – WP 3.5
- How do I use the WP image functions in a page template?
- How to get the image EXIF date/time and use it for the WP post date/time
- Removing default image size list in Media Box
- Hide old attachments from wp media library
- Customize WordPress Media Manager – Media Window
- How to reduce original image quality on upload?
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- Make Categories a Dropdown Menu in Media Library
- How to display more audio file ID3 tags in WordPress
- Can I hide certain upload folders in media library [duplicate]
- Restore Image Title Text
- Updating Media Published Date When Parent Post Is Modified in WordPress
- WordPress converts media extention URL automatically to video player
- Set spesific size of featured images
- Load custom css in functions.php causing library issue
- Limit dimensions of “Full” size images
- How to stop media_sideload_image from running when deleting a post?
- Possible to hook into Media Library preview File column and use a custom image?
- Can’t locate custom image sizes defined by child theme
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Facebook OpenGraph error, Call to undefined function wp_get_attachment_src()
- Custom image sizes showing in Classic Editor only when upladed directly to post
- how can I change all wordpress media file url to custom cdn url?
- How to add if statement on WordPress shortcode output
- Is it possible to limit number of files a non-admin user can upload via the WordPress media library?
- Auto delete content in specific folder inside media library
- Put images in the media from url functions
- Function image_send_to_editor returns emty title tag
- Zip all (original) images from media gallery
- Create input select image URL?
- Additional folder where will Media Library look for files
- Uploading images via ACF update_field function
- Enqueue script if not page template
- External api call and make global variable for any page visitor enters , page-home, page, single etc
- Is_Page doesnt detect my page
- How do you insert code into the sidebar?
- How Do I Unhook This Parent Theme Function?
- price of product can’t return when get data of product in functions.php
- Including Font Awesome in a Custom Theme
- remove_filter function to unhook twentysixteen parent theme function
- WP AJAX Request Not Working
- Test CDN link from function.php or wp_enqueue_script/style?
- Unable to login after registration
- Woocommerce product price change
- Remove the ‘category’ url for one category type
- Can we have conditional CSS styling?
- CSS style and app.js not loading
- Change function without filter hook
- Security when outputing wp_oembed_get code
- Help with with my function for wordpress
- Widget is displayed in two places
- unsharp thumbnails after uploading image
- Allow user only create specific tags
- is_email gives me error
- Trying to change widgets h-tags
- only update titles of single posts
- Post content overflows on my mobile phone
- Stylesheet does not load despite functions.php
- OOP Switch statement with array as parameter
- I want to display the sku in the product pages of my EDD website
- How to customize archive widget only for cpt?
- Add Change role button for list of user in an event
- Custom Function.PHP Code Not Working on One Site
- Adding new Category does not refresh the backoffice
- How set a while with a function
- Ajax in plugin fails – but only on one blog – no idea why
- get_current_user_id() always return 0 in if else statement
- Trying to get the path to my child-theme via my functions.php
- How do i tweak my wp Post title base on category of the post
- Why isn’t comment validation working?
- I can’t in any way include css in my theme using functions.php
- I have an fatal error on my funcyions.php
- Get post_author email for Zapier Integration
- Post-processing of the image failed
- Enable CORS Request for hostname using IP address
- Remove clickable Link of WordPress Site Logo from Woocommerce Single Product page
- Remove nofollow from internal comment links via functions.php
- Author social media aren’t shown on the page
- I have defined 2 text strings, how do I use them in my posts?
- How to make the RTL.css the dominant css code?
- Images not displaying on site or media library
- is_product_category(‘Services’) not working
- Is there anyway to force is_singular() to be true when not loading template?
- Allow logged in user to view a Page, else send to login screen and then redirect back to Page
- How to automatically add counted number to navigation menu items?
- Media Library Mess After FTP … /uploads
- Show image after X para – center aligned
- Re-style Login Form Whilst Keeping CSS Separate from Frontend CSS
- Can You Set A Minimum Image Dimension For Resizing Images?
- How to create an array if ’empty’?
- wp_title() return random number
- Problems adding a new field to product in cart
- Auto Resize embedded videos player
- blank page with wp_get_attachment
- How to add javascript code into Divi child theme?
- Can site visitors view functions.php file?
- Parent category as WOOCommerce Categories widget title