<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cedric Isubol</title>
    <description>The latest articles on DEV Community by Cedric Isubol (@cedric_i).</description>
    <link>https://dev.to/cedric_i</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2295901%2Fd3589cf5-0b91-476d-8989-e6de0856ae29.jpg</url>
      <title>DEV Community: Cedric Isubol</title>
      <link>https://dev.to/cedric_i</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cedric_i"/>
    <language>en</language>
    <item>
      <title>VUE JS Image preview 2024(100% working)</title>
      <dc:creator>Cedric Isubol</dc:creator>
      <pubDate>Mon, 28 Oct 2024 18:29:32 +0000</pubDate>
      <link>https://dev.to/cedric_i/vue-js-image-preview-2024100-working-13l0</link>
      <guid>https://dev.to/cedric_i/vue-js-image-preview-2024100-working-13l0</guid>
      <description>&lt;p&gt;&lt;strong&gt;I have tested this code and its working on vue js 3, and in plain javascript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function onImageChange (event) {
  const file = document.getElementById('profilePhoto').files[0] // Get selected file

  if (file) {
    const reader = new FileReader()

    // Once the file is read as Data URL (base64), display the preview
    reader.onload = function (e) {
      photo.value = e.target.result // Set the base64 data as the image source
    }

    reader.readAsDataURL(file) // Read the file as base64 Data URL
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
  </channel>
</rss>
