Skip to content

Instantly share code, notes, and snippets.

@Mozart409
Last active April 12, 2020 10:03
Show Gist options
  • Save Mozart409/66f2963039f316660feda0d8620a0b97 to your computer and use it in GitHub Desktop.
Save Mozart409/66f2963039f316660feda0d8620a0b97 to your computer and use it in GitHub Desktop.
Trying to use .tif images
➜ yarn start
yarn run v1.22.0
$ gatsby develop
success open and validate gatsby-configs - 0.067s
success load plugins - 1.294s
success onPreInit - 0.005s
success initialize cache - 0.030s
success copy gatsby files - 0.075s
success onPreBootstrap - 0.019s
success createSchemaCustomization - 0.010s
success source and transform nodes - 3.713s
success building schema - 0.421s
success createPages - 0.003s
success createPagesStatefully - 0.088s
success onPreExtractQueries - 0.002s
success update schema - 0.032s
success extract queries from components - 0.536s
success write out requires - 0.050s
success write out redirect data - 0.005s
warn The icon(src/images/Logo.svg) you provided to 'gatsby-plugin-manifest' is not square.
The icons we generate will be square and for the best results we recommend you provide a square
icon.
success Build manifest and related icons - 0.535s
success onPostBootstrap - 0.544s
info bootstrap finished - 11.426 s
[=== ] 4.649 s 1/8 13% run queries
[================== ] 4.591 s 12/18 67% Generating image thumbnails
—————————————————————————————————————————————————————————————————————————————————————————————————
4 pages In Progress gatsby-custom-tailwind
/Users/amadeus/Desktop/electron/PatrickLandingPage/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
Error: w and h must be numbers
at Jimp.throwError (/Users/amadeus/Desktop/electron/PatrickLandingPage/node_modules/@jimp/utils/dist/index.js:35:13)
at Jimp.scanQuiet (/Users/amadeus/Desktop/electron/PatrickLandingPage/node_modules/@jimp/core/dist/index.js:1345:30)
at Jimp.(anonymous function) [as scan] (/Users/amadeus/Desktop/electron/PatrickLandingPage/node_modules/@jimp/core/dist/index.js:1266:23)
at Potrace._processLoadedImage (/Users/amadeus/Desktop/electron/PatrickLandingPage/node_modules/potrace/lib/Potrace.js:1005:11)
at Jimp.<anonymous> (/Users/amadeus/Desktop/electron/PatrickLandingPage/node_modules/potrace/lib/Potrace.js:1048:14)
at Timeout._onTimeout (/Users/amadeus/Desktop/electron/PatrickLandingPage/node_modules/@jimp/core/dist/index.js:354:25)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
(sharp:2184): GLib-CRITICAL **: 11:58:52.892: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:2184): GLib-CRITICAL **: 11:58:52.892: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
(sharp:2184): GLib-CRITICAL **: 11:58:52.892: g_hash_table_lookup: assertion 'hash_table != NULL' failed
error Command failed with signal "SIGSEGV".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
/*eslint no-template-curly-in-string:0*/
module.exports = {
siteMetadata: {
title: `Patrick Mayr`,
description: `Photodesign`,
author: `@mozart409`,
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-sitemap`,
`gatsby-transformer-sharp`,
{
resolve: `gatsby-plugin-sharp`,
options: {
useMozJpeg: false,
stripMetadata: true,
defaultQuality: 75,
jpegProgressive:true
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images/`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images/Booklet`,
},
},
{
resolve: `gatsby-source-instagram`,
options: {
username: `patrickmayr`,
paginate: 100,
maxPosts: 100,
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `patrickmayr`,
short_name: `p.mayr`,
start_url: `/`,
background_color: `#ffffff`,
theme_color: `#4dc0b5`,
display: `minimal-ui`,
icon: `src/images/Logo.svg`
}
},
`gatsby-plugin-postcss`,
{
resolve: `gatsby-plugin-purgecss`,
options: {
tailwind: true,
purgeOnly: [`src/css/style.css`]
}
},
`gatsby-plugin-offline`
]
};
const data = useStaticQuery(
graphql`
{
Patrick: file(relativePath: { eq: "Patrick.jpg" }) {
id
childImageSharp {
fluid(
maxWidth: 500
maxHeight: 500
quality: 100
cropFocus: NORTH
) {
...GatsbyImageSharpFluid_withWebp
}
}
}
PatrickTif: file(relativePath: { eq: "Patrick.tif" }) {
id
childImageSharp {
fluid(
maxWidth: 1000
maxHeight: 600
quality: 100
cropFocus: ENTROPY
) {
...GatsbyImageSharpFluid_withWebp_tracedSVG
}
}
}
}
`
);
<Img
className="h-56 w-full my-5 sm:my-8 rounded object-cover sm:h-72 md:h-96 lg:w-full lg:h-full"
fluid={data.Patrick.childImageSharp.fluid}
alt="Patrick Mayr"
/>
{
"name": "gatsby-custom-tailwind",
"description": "Custom Tailwind Starter",
"version": "0.1.0",
"author": "Mozart409",
"dependencies": {
"@tailwindcss/ui": "^0.1.3",
"gatsby": "^2.20.18",
"gatsby-cli": "^2.11.7",
"gatsby-plugin-manifest": "2.3.3",
"gatsby-plugin-offline": "3.1.2",
"gatsby-plugin-postcss": "2.2.1",
"gatsby-plugin-purgecss": "5.0.0",
"gatsby-plugin-react-helmet": "3.2.2",
"gatsby-plugin-robots-txt": "^1.5.0",
"gatsby-plugin-sitemap": "^2.2.21",
"gatsby-source-instagram": "^0.7.0",
"graphql": "15.0.0",
"prop-types": "15.7.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-helmet": "^6.0.0",
"typeface-playfair-display": "^1.1.4"
},
"keywords": [
"gatsby",
"tailwind",
"tailwindcss",
"purgecss"
],
"license": "MIT",
"scripts": {
"analyze:lint": "eslint --ext .jsx --ext .js .",
"analyze:prettier": "prettier --list-different src/**/*.{js,css}",
"analyze": "yarn run analyze:lint && yarn run analyze:prettier",
"fix:lint": "eslint --ext .jsx --ext .js . --fix",
"fix:prettier": "prettier --write src/**/*.{js,css}",
"fix": "yarn run fix:lint && yarn run fix:prettier",
"start": "gatsby develop",
"build": "gatsby clean && gatsby build",
"build:noclean": "gatsby build",
"serve": "serve -l 9000 public",
"prod": "yarn build && yarn serve",
"test": "echo \"Write tests! -> https://gatsby.app/unit-testing\""
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "2.27.0",
"@typescript-eslint/parser": "2.27.0",
"babel-eslint": "10.1.0",
"eslint": "6.8.0",
"eslint-config-react-app": "5.2.1",
"eslint-plugin-flowtype": "4.7.0",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "3.0.0",
"gatsby-image": "^2.3.2",
"gatsby-plugin-sharp": "^2.5.3",
"gatsby-source-filesystem": "^2.2.2",
"gatsby-transformer-sharp": "^2.4.3",
"prettier": "2.0.4",
"prettier-standard": "^16.2.1",
"serve": "^11.3.0",
"tailwindcss": "1.2.0",
"typescript": "3.8.3"
},
"publishConfig": {
"access": "public"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment