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
- How to add a data attribute to a WordPress menu item
- Order posts (across the whole site) by metadata date
- Functions.php code that only runs on localhost?
- hook a functions to change wp-config from functions.php
- Relative URLs and hide /wp-content/themes/
- Append button to WordPress Image Details modal
- Slugs as breadcrumbs for Pages
- Removing Unnecessary Text from Admin Menu without CSS
- Display WordPress Search
- Remove_filter (‘the_content’, ‘wpautop’) is not working
- Where does function_exists() look to decide whether a function exists? [closed]
- Clean-up script tags
- WordPress function for 1 to for many
- How to bulk Edit Dates in Media Library?
- How can you limit srcset on a single type of page?
- Remove Font-Awesome MaxCDN Link & Load Locally
- How to fix Warning: call_user_func_array()?
- How to get specified parent page title in my function
- I want to get product attirbute in the section below
- Uppload image from another source wp.media
- move_uploaded_file() not working on wordpress front end
- How to fetch the name of the active menu?
- How can I show my latest tweet in my wordpress blog?
- How to retrieve the current post’s generated featured image size?
- Why There Is No “get content by ID” Function
- Function shortcode – Set Parameter
- Is there a way to prevent a function/method from being called outside a specific hook?
- attachment page template? only show attachments for current post?
- get_next_posts_link() returns no result despite available posts
- Randomizing wp_tag_cloud() in child theme
- Nav menus all outputting the same links
- Secondary Menu and Logged In Users
- Modify gform_other_choice_value for specific form and specific field in Gravity Forms
- Adding code before post title with the_title produces weird results
- How to insert class in each list of categories?
- Add Link to Users List (Backend) to open each users front-end profile
- Editing the formatting.php file vs functions.php file?
- wp_usermeta – Read from database, but save function broken
- remove/hide wp-editor
- Function not saving unchecked checkbox
- Removing parent theme CSS without editing parent theme
- Entirely Different Functions.php per Page?
- Problem with shortcode inside a shortcode
- Hide Author By-Line if After Certain Date
- Can’t upload format files on media library
- wp_title() return random number
- How to offset main query without affecting other queries and backend
- ACF Date Form in Custom Admin Field
- How to add link rel tags on paginated posts?
- How to pass data from a plugin to functions.php
- Function to disable “href” anchor tags that contain “a data-name” on mobile only
- Execute jQuery with custom event listener after successfully add an item to the cart
- WordPress hooks to call a function inside a construct
- WordPress undefined function error on using add_action() in functions.php
- Load a Child Theme’s style.css just before the closing tag
- Can’t wrap my head around this function – any help would be appreciated
- Figure inlined width trigger distorted layout
- Exclude javascript in certain page url and all following url’s after forward slash
- Shortcode Variations?
- How to test for a class (from a plugin) in functions.php
- Child Theme not working – CSS gone
- Custom shortcode not being included in content paragraph [duplicate]
- Display post_meta-by_key on product catalogue
- Which template file to edit to edit homepage in Mystile [closed]
- Customizer cuistom CSS Priority ordre Issue
- WPDB query suddenly not working