Skip to content

Instantly share code, notes, and snippets.

@joedolson
Created April 12, 2024 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joedolson/9e14117850d9e4b6aa7e039a609bfe48 to your computer and use it in GitHub Desktop.
Save joedolson/9e14117850d9e4b6aa7e039a609bfe48 to your computer and use it in GitHub Desktop.
Console JS for viewing uploaded images in Gravity Forms admin list
let images = document.querySelectorAll( '.field_id-18 a' ); images.forEach( function( el ) { let url = el.getAttribute( 'href' ); let img = el.querySelector( 'img' ); img.setAttribute( 'src', url ); } );
@joedolson
Copy link
Author

Change the selector as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment