{"id":1116,"date":"2012-12-29T15:03:36","date_gmt":"2012-12-29T15:03:36","guid":{"rendered":"http:\/\/jonathanbjorkskog.com\/?p=1116"},"modified":"2014-08-29T11:18:51","modified_gmt":"2014-08-29T11:18:51","slug":"print-the-first-picture-from-a-wordpress-post","status":"publish","type":"post","link":"https:\/\/jonathanbjorkskog.com\/es\/print-the-first-picture-from-a-wordpress-post","title":{"rendered":"Imprimir la primera imagen de un post de wordpress"},"content":{"rendered":"<p><strong>Catch the first image from a wordpress post<\/strong>? Why is there needed a function for that? There are already the &#8220;<em>featured image<\/em>&#8221; function in WordPress. Well, for many purposes, that cannot be used. For example if you have a blog where a lot of people are writing, and you are listing excerpts with a image in your front page or category pages, like I do on this blog. If you do, the easiest way is to let people use featured image in blog posts, and then you just print that one in your index.php and category.php. But the problem is, people does not always remember to use featured image. And you do not want to teach them all the time how to do. And you do not want your site&#8217;s design to break because bloggers are forgetting to use the function. Then a fallback function <strong>picking the first picture from the post<\/strong> is great!<!--more--><\/p>\n<h2>The code for printing the first image from a post in WordPress:<\/h2>\n<h3>This goes in to functions.php:<\/h3>\n<p>\/\/ Get URL of first image in a post<br \/>\nfunction catch_that_image() {<br \/>\nglobal $post, $posts;<br \/>\n$first_img = &#8221;;<br \/>\nob_start();<br \/>\nob_end_clean();<br \/>\n$output = preg_match_all(&#8216;\/&lt;img.+src=[\\'&#8221;]([^\\'&#8221;]+)[\\'&#8221;].*&gt;\/i&#8217;, $post-&gt;post_content, $matches);<br \/>\n$first_img = $matches [1] [0];<\/p>\n<p>\/\/ no image found display default image instead<br \/>\nif(empty($first_img)){<br \/>\n$first_img = &#8220;\/images\/default.jpg&#8221;;<br \/>\n}<br \/>\nreturn $first_img;<br \/>\n}<\/p>\n<h3>This goes into category.php, index.php or where ever you want to use it:<\/h3>\n<p>&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221; title=&#8221;&lt;?php the_title(); ?&gt;&#8221;&gt;&lt;img src=&#8221;&lt;?php echo catch_that_image(); ?&gt;&#8221; alt=&#8221;&lt;?php the_title(); ?&gt;&#8221; \/&gt;&lt;\/a&gt;<\/p>\n<p>I hope I could help you. At least\u00a0the code for printing the first image from a post in WordPress\u00a0helped me in at least three projects.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00bfCoger la primera imagen de un post de wordpress? \u00bfPor qu\u00e9 se necesita una funci\u00f3n para eso? Ya existe la funci\u00f3n \"imagen destacada\" en WordPress. Bueno, para muchos prop\u00f3sitos, que no se puede utilizar. Por ejemplo, si usted tiene un blog donde un mont\u00f3n de gente est\u00e1 escribiendo, y usted est\u00e1 listando extractos con una imagen...<\/p>","protected":false},"author":1,"featured_media":1269,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[52],"tags":[],"class_list":["post-1116","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Print the first picture from a wordpress post - Jonathan Bj\u00f6rkskog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jonathanbjorkskog.com\/es\/print-the-first-picture-from-a-wordpress-post\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Print the first picture from a wordpress post - Jonathan Bj\u00f6rkskog\" \/>\n<meta property=\"og:description\" content=\"Catch the first image from a wordpress post? Why is there needed a function for that? There are already the &#8220;featured image&#8221; function in WordPress. Well, for many purposes, that cannot be used. For example if you have a blog where a lot of people are writing, and you are listing excerpts with a image...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jonathanbjorkskog.com\/es\/print-the-first-picture-from-a-wordpress-post\/\" \/>\n<meta property=\"og:site_name\" content=\"Jonathan Bj\u00f6rkskog\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/Jonathan.Bjorkskog\" \/>\n<meta property=\"article:published_time\" content=\"2012-12-29T15:03:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-08-29T11:18:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jonathan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JonathanBJ\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post\"},\"author\":{\"name\":\"Jonathan\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#\\\/schema\\\/person\\\/dc27f073951abad63af3a5988d59cad0\"},\"headline\":\"Print the first picture from a wordpress post\",\"datePublished\":\"2012-12-29T15:03:36+00:00\",\"dateModified\":\"2014-08-29T11:18:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post\"},\"wordCount\":319,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/wordpress-first-picture-printed.jpg\",\"articleSection\":[\"Wordpress\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post\",\"url\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post\",\"name\":\"Print the first picture from a wordpress post - Jonathan Bj\u00f6rkskog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/wordpress-first-picture-printed.jpg\",\"datePublished\":\"2012-12-29T15:03:36+00:00\",\"dateModified\":\"2014-08-29T11:18:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post#primaryimage\",\"url\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/wordpress-first-picture-printed.jpg\",\"contentUrl\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/wordpress-first-picture-printed.jpg\",\"width\":1200,\"height\":700},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/print-the-first-picture-from-a-wordpress-post#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Wordpress\",\"item\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/category\\\/wordpress\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Print the first picture from a wordpress post\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#website\",\"url\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/\",\"name\":\"Jonathan Bj\u00f6rkskog\",\"description\":\"Growth Marketing since 2009\",\"publisher\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#organization\",\"name\":\"Jonathan Bj\u00f6rkskog\",\"url\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/wp-content\\\/uploads\\\/2010\\\/06\\\/8330_154078676372_561696372_3193947_7420903_n.jpg\",\"contentUrl\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/wp-content\\\/uploads\\\/2010\\\/06\\\/8330_154078676372_561696372_3193947_7420903_n.jpg\",\"width\":\"391\",\"height\":\"401\",\"caption\":\"Jonathan Bj\u00f6rkskog\"},\"image\":{\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jonathanbjorkskog.com\\\/#\\\/schema\\\/person\\\/dc27f073951abad63af3a5988d59cad0\",\"name\":\"Jonathan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/639d9916e0b5fbdf8638629287dba1e9e01aa58ac3db092f0d436b15e176a751?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/639d9916e0b5fbdf8638629287dba1e9e01aa58ac3db092f0d436b15e176a751?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/639d9916e0b5fbdf8638629287dba1e9e01aa58ac3db092f0d436b15e176a751?s=96&d=mm&r=g\",\"caption\":\"Jonathan\"},\"description\":\"Jonathan Bj\u00f6rkskog is a marketer \\\/ Growth Hacker from Finland, that has been working full time with marketing for big corporations and some of the largest e-commerce sites in Northern Europe. With a passion for organic search, content, and growth, and a background in tech and coding, he has a broad overview of the strategies and tactics of online marketing. Having started up an agency with over 100 employees also helps to get a broad overview of what any kind of business could do to be successful online.\",\"sameAs\":[\"https:\\\/\\\/jonathanbjorkskog.com\\\/\",\"https:\\\/\\\/www.facebook.com\\\/Jonathan.Bjorkskog\",\"https:\\\/\\\/www.instagram.com\\\/jonathanbjorkskog\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jonathanbjorkskog\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/JonathanBJ\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Imprimir la primera imagen de un post de wordpress - Jonathan Bj\u00f6rkskog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jonathanbjorkskog.com\/es\/print-the-first-picture-from-a-wordpress-post\/","og_locale":"es_ES","og_type":"article","og_title":"Print the first picture from a wordpress post - Jonathan Bj\u00f6rkskog","og_description":"Catch the first image from a wordpress post? Why is there needed a function for that? There are already the &#8220;featured image&#8221; function in WordPress. Well, for many purposes, that cannot be used. For example if you have a blog where a lot of people are writing, and you are listing excerpts with a image...","og_url":"https:\/\/jonathanbjorkskog.com\/es\/print-the-first-picture-from-a-wordpress-post\/","og_site_name":"Jonathan Bj\u00f6rkskog","article_author":"https:\/\/www.facebook.com\/Jonathan.Bjorkskog","article_published_time":"2012-12-29T15:03:36+00:00","article_modified_time":"2014-08-29T11:18:51+00:00","og_image":[{"width":1200,"height":700,"url":"https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg","type":"image\/jpeg"}],"author":"Jonathan","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JonathanBJ","twitter_misc":{"Escrito por":"Jonathan","Tiempo de lectura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post#article","isPartOf":{"@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post"},"author":{"name":"Jonathan","@id":"https:\/\/jonathanbjorkskog.com\/#\/schema\/person\/dc27f073951abad63af3a5988d59cad0"},"headline":"Print the first picture from a wordpress post","datePublished":"2012-12-29T15:03:36+00:00","dateModified":"2014-08-29T11:18:51+00:00","mainEntityOfPage":{"@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post"},"wordCount":319,"commentCount":2,"publisher":{"@id":"https:\/\/jonathanbjorkskog.com\/#organization"},"image":{"@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post#primaryimage"},"thumbnailUrl":"https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg","articleSection":["Wordpress"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post","url":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post","name":"Imprimir la primera imagen de un post de wordpress - Jonathan Bj\u00f6rkskog","isPartOf":{"@id":"https:\/\/jonathanbjorkskog.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post#primaryimage"},"image":{"@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post#primaryimage"},"thumbnailUrl":"https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg","datePublished":"2012-12-29T15:03:36+00:00","dateModified":"2014-08-29T11:18:51+00:00","breadcrumb":{"@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post#primaryimage","url":"https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg","contentUrl":"https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg","width":1200,"height":700},{"@type":"BreadcrumbList","@id":"https:\/\/jonathanbjorkskog.com\/print-the-first-picture-from-a-wordpress-post#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jonathanbjorkskog.com\/"},{"@type":"ListItem","position":2,"name":"Wordpress","item":"https:\/\/jonathanbjorkskog.com\/category\/wordpress"},{"@type":"ListItem","position":3,"name":"Print the first picture from a wordpress post"}]},{"@type":"WebSite","@id":"https:\/\/jonathanbjorkskog.com\/#website","url":"https:\/\/jonathanbjorkskog.com\/","name":"Jonathan Bj\u00f6rkskog","description":"Growth Marketing desde 2009","publisher":{"@id":"https:\/\/jonathanbjorkskog.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jonathanbjorkskog.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/jonathanbjorkskog.com\/#organization","name":"Jonathan Bj\u00f6rkskog","url":"https:\/\/jonathanbjorkskog.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/jonathanbjorkskog.com\/#\/schema\/logo\/image\/","url":"https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2010\/06\/8330_154078676372_561696372_3193947_7420903_n.jpg","contentUrl":"https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2010\/06\/8330_154078676372_561696372_3193947_7420903_n.jpg","width":"391","height":"401","caption":"Jonathan Bj\u00f6rkskog"},"image":{"@id":"https:\/\/jonathanbjorkskog.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jonathanbjorkskog.com\/#\/schema\/person\/dc27f073951abad63af3a5988d59cad0","name":"Jonathan","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/639d9916e0b5fbdf8638629287dba1e9e01aa58ac3db092f0d436b15e176a751?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/639d9916e0b5fbdf8638629287dba1e9e01aa58ac3db092f0d436b15e176a751?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/639d9916e0b5fbdf8638629287dba1e9e01aa58ac3db092f0d436b15e176a751?s=96&d=mm&r=g","caption":"Jonathan"},"description":"Jonathan Bj\u00f6rkskog es un vendedor \/ Growth Hacker de Finlandia, que ha estado trabajando a tiempo completo con la comercializaci\u00f3n de las grandes empresas y algunos de los mayores sitios de comercio electr\u00f3nico en el norte de Europa. Con una pasi\u00f3n por la b\u00fasqueda org\u00e1nica, el contenido y el crecimiento, y un fondo en la tecnolog\u00eda y la codificaci\u00f3n, que tiene una amplia visi\u00f3n de las estrategias y t\u00e1cticas de marketing online. Haber puesto en marcha una agencia con m\u00e1s de 100 empleados tambi\u00e9n ayuda a tener una amplia visi\u00f3n de lo que cualquier tipo de empresa puede hacer para tener \u00e9xito en Internet.","sameAs":["https:\/\/jonathanbjorkskog.com\/","https:\/\/www.facebook.com\/Jonathan.Bjorkskog","https:\/\/www.instagram.com\/jonathanbjorkskog\/","https:\/\/www.linkedin.com\/in\/jonathanbjorkskog\/","https:\/\/x.com\/https:\/\/twitter.com\/JonathanBJ"]}]}},"uagb_featured_image_src":{"full":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",1200,700,false],"thumbnail":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed-150x150.jpg",150,150,true],"medium":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed-620x361.jpg",620,361,true],"medium_large":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",768,448,false],"large":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed-620x361.jpg",620,361,true],"1536x1536":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",1200,700,false],"2048x2048":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",1200,700,false],"trp-custom-language-flag":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",18,12,false],"ptam-block-post-grid-landscape":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",600,350,false],"ptam-block-post-grid-square":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",600,350,false],"ptam-block-post-grid-featured-landscape":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",1000,583,false],"wplb_square":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",500,292,false],"web-stories-poster-portrait":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",640,373,false],"web-stories-publisher-logo":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",96,56,false],"web-stories-thumbnail":["https:\/\/jonathanbjorkskog.com\/wp-content\/uploads\/2012\/12\/wordpress-first-picture-printed.jpg",150,88,false]},"uagb_author_info":{"display_name":"Jonathan","author_link":"https:\/\/jonathanbjorkskog.com\/es\/author\/admin"},"uagb_comment_info":2,"uagb_excerpt":"Catch the first image from a wordpress post? Why is there needed a function for that? There are already the &#8220;featured image&#8221; function in WordPress. Well, for many purposes, that cannot be used. For example if you have a blog where a lot of people are writing, and you are listing excerpts with a image...","_links":{"self":[{"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/posts\/1116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/comments?post=1116"}],"version-history":[{"count":3,"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/posts\/1116\/revisions"}],"predecessor-version":[{"id":1121,"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/posts\/1116\/revisions\/1121"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/media\/1269"}],"wp:attachment":[{"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/media?parent=1116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/categories?post=1116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jonathanbjorkskog.com\/es\/wp-json\/wp\/v2\/tags?post=1116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}