Issues with displaying an image from a public Google Drive link in NextJS due to img tag not

Hello there,

I recently put together my portfolio website, added all the necessary images to my Google Drive, and used the public URL as the src value in the <img /> tag. Initially, the images were loading without any problems. However, I'm now experiencing issues where the images are not loading in both development and production modes. I've been struggling to identify the root cause of this problem.

Here are some troubleshooting steps I've taken:

  • When I directly call the image from the 'public' folder, it loads correctly. But when I try to load the same image from my Google Drive using its public URL, it fails to load.
  • I double-checked to ensure that the image on my Google Drive still exists and that its access permissions are set to public.
  • I also verified that the images configuration for the Google Drive domain is properly set in my 'next.config.js' file, even though I'm using <img /> instead of <Image />.
  • Using <Image /> successfully loads the image, but switching all instances of <img /> in my source code to <Image /> and including width and height values for each image seems like a cumbersome workaround.
  • I scoured the internet for possible causes and solutions, but unfortunately came up empty-handed.

You can visit the website at , and access the source code via this link: https://github.com/favoursyre/portfolio_frontend.git

If anyone could offer insights into the issue and suggest possible solutions, I would greatly appreciate it.

Thank you and best regards

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Ways in which you can construct using Next.js along with fetch() and .env settings

Can someone please help me with this issue? I'm struggling to find a solution even after searching online. I'm new to this, so any guidance would be appreciated! I have a Next.js 14 (App Router) + Prisma app that works fine in my local environme ...

Creating a fresh dataset using a 2D array in node-gdal-async

I'm facing a challenge in JavaScript where I need to create a new dataset from a 2D array. Despite my efforts, I can't seem to figure out the necessary steps from the documentation. It seems that in order to create this new dataset, I must utili ...

Different ways to reference a variable in Typescript without relying on the keyword "this" throughout the codebase

Can we eliminate the need to write "this" repeatedly, and find a way to write heroes, myHero, lastone without using "this"? Similar to how it is done in common JavaScript. https://i.stack.imgur.com/TZ4sM.png ...

Course completed following the module

As a newcomer to Angular, I am facing an issue with saving data in a class and reading it into a component. It seems that the component is rushing to display results before the class has finished processing them, resulting in an error message being printed ...

Running complex Firestore query within Cloud Functions

Currently, I am developing triggers that interact with a Firestore movie and user database. The main goal of one trigger is to present a new user with a list of top-rated movies in genres they have selected as their favorites. To achieve this, I store the ...

Different ways to categorize elements of Timeline using typescript

I have some code that generates a timeline view of different stages and their corresponding steps based on an array of stages. Each stage includes its name, step, and status. My goal is to organize these stages by name and then display the steps grouped un ...

What is preventing the value from changing in auth.guard?

I am encountering an issue with the variable loggined, which I modify using the logTog() method. When I call this method, a request is made to a service where the current result is passed to auth.guard. However, in the console, it displays "undefined". Can ...

I am facing an issue with my Dynamic route in NextJS - despite writing what seems to be correct code, it keeps returning a 404 Error

Currently, I am learning how to create a Weather App in NextJS by following a tutorial. The person guiding me is using the 'pages' structure while I have opted for the 'app' structure. Everything was going smoothly until I encountered a ...

Unexpected error: Angular 4 TypeScript validation issue - An object literal can only define recognized properties

excellent customer service import {Account} from '../models/Account'; export class AccountingService { domain: string = "http://localhost:3000/api"; constructor(private http: HttpClient) { } getAccounts(){ return this.http.get&l ...

Thumbnail for Reddit link not displaying due to dynamic OG:image issue

I am currently working on a NextJS app that allows users to share links to Reddit. The issue I am facing is that the link preview in Reddit always shows the same thumbnail image, regardless of the shared link. Interestingly, this problem does not occur whe ...

Differentiating between model types and parameters in Prisma can greatly enhance your understanding of

Consider the following scenario: const modifyData = async(data, settings) => { await data.update(settings) } In this case, the data refers to any data source, and the settings consist of objects like where and options for updating the data. How can ...

In Next.js, anchor links do not smoothly scroll between pages

Within my nextjs project, I have implemented a navigation menu within the header. This menu consists of links like /#apartments, /#reviews, and /#contact-us. Each of these links directs users to the main landing page at /, with unique hash values that allo ...

The library path in a react (js) integrated mono repo could not be resolved by Nx 16

Greetings everyone, I am a newcomer to the world of NX Monorepo. Following the step-by-step instructions on how to create an Integrated React Monorepo from the official NX website can be found here. I diligently followed each instruction provided. Howeve ...

The 'path' property is not found on the 'ValidationError' type when using express-validator version 7.0.1

When utilizing express-validator 7.0.1, I encounter an issue trying to access the path field. The error message indicates that "Property 'path' does not exist on type 'ValidationError'.: import express, { Request, Response } from " ...

Discovering the ASP.NET Core HTTP response header in an Angular application using an HTTP interceptor

I attempted to create a straightforward app version check system by sending the current server version to the client in the HTTP header. If there's a newer version available, it should trigger a notification for the user to reload the application. Ini ...

The error message "Property 'toBeInTheDocument' is not recognized by type 'JestMatchers<HTMLElement>'" is encountered when using Webpack 5 and Jest

I've been struggling to configure Jest typings with Webpack 5 and TypeScript. Even after trying various solutions, the issue persists only with "screen" and "toBeInTheDocument" in my test example below. My suspicion is that it's related to an ESL ...

Discovering items located within other items

I am currently attempting to search through an object array in order to find any objects that contain the specific object I am seeking. Once found, I want to assign it to a variable. The interface being used is for an array of countries, each containing i ...

Next-Auth combined with Prism encountered an error: "TypeError: Unable to access properties of undefined (reading 'user')"

Implementation of next-auth using EmailProvider and a Prisma adapter based on the provided documentation is completed authOptions const prisma = globalThis.prisma || new PrismaClient(); globalThis.prisma = prisma; export const authOptions = { // Config ...

Creating a customizable filter by using the function of an object

I am currently developing a customizable dynamic filter system, similar to the functionalities offered by Yahoo Screener. To achieve this, I have defined an interface for the available filter fields: export interface FilterField { label: string; se ...

Is it possible to simulate or replace a static namespace function call when using Jasmine with Ionic framework?

I am currently navigating through new territory, so I appreciate your patience. My current project involves Ionic 2 using Angular 2, Typescript, and Jasmine for unit testing. At this moment, I am faced with the challenge of writing a unit test for a unique ...